/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #000000;
  --text-dark: #1a1a1a;
  --text-medium: #4a4a4a;
  --text-light: #6a6a6a;
  --bg-white: #ffffff;
  --bg-light: #fafafa;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
  --max-width: 1200px;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-medium);
  line-height: 1.8;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

/* Header & Navigation */
header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
}

.logo img {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-medium);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
  opacity: 1;
}

.nav-links a::before {
  content: "·";
  margin-right: 0.75rem;
  color: var(--border-color);
}

.nav-links a:first-child::before {
  content: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
  align-items: center;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-dark);
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

/* Main Container */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  padding: 8rem 0;
  text-align: center;
  position: relative;
  background-image: url('/assets/images/hero-illustration.webp');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Buttons */
.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid var(--primary-color);
  text-align: center;
  background-color: var(--primary-color);
  color: white;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover:not(:disabled) {
  background-color: var(--bg-white);
  color: var(--primary-color);
  opacity: 1;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Sections */
section {
  padding: 6rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-dark);
}

/* Bio Section */
.bio {
  max-width: 800px;
  margin: 0 auto;
  padding: 6rem 0;
}

.bio h2 {
  margin-bottom: 2.5rem;
  text-align: center;
  font-size: 2rem;
}

.bio p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-medium);
}

/* Featured Sections */
.projects-featured {
  margin-top: 0;
  background-color: var(--bg-white);
  padding: 6rem 0;
}

.research-featured {
  margin-top: 0;
  background-color: var(--bg-light);
  padding: 6rem 0;
}

.research-card {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.research-card:hover {
  box-shadow: var(--shadow-lg);
}

.research-card-image {
  width: 100%;
  height: auto;
}

.research-card-content h3 {
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.research-card-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--text-medium);
}

.research-card-content .meta {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* About Page */
.about-header {
  text-align: center;
  padding: 4rem 0 2rem;
}

.about-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
}

.about-content h1 {
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.about-content p {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--text-medium);
}

.about-illustration {
  width: 100%;
  height: auto;
  border: 1px solid var(--border-color);
  padding: 2rem;
}

/* Research Page */
.research-list {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 2rem;
}

.research-item {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 3rem;
  margin-bottom: 2rem;
  transition: all 0.2s ease;
}

.research-item:hover {
  box-shadow: var(--shadow-md);
}

.research-item h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.research-item .meta {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.research-item .summary {
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--text-medium);
}

.project-subtitle {
  font-size: 1.125rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
}

.research-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.placeholder {
  background-color: var(--bg-light);
  height: 200px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9375rem;
  margin: 2rem 0;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 2rem;
}

.project-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 2.5rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.project-card-header {
  margin-bottom: 1.5rem;
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--text-dark);
}

.project-meta {
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0;
}

.project-description {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-medium);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tag {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-card .btn {
  align-self: flex-start;
}

/* Project Detail Pages */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 2rem;
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 3rem;
  transition: all 0.2s ease;
}

.breadcrumb {
  margin-bottom: 2rem;
}

.breadcrumb a {
  color: var(--text-medium);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.project-intro {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.project-intro .meta {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.project-intro .lead {
  font-size: 1.1875rem;
  line-height: 1.8;
  color: var(--text-medium);
}

.project-section {
  margin-bottom: 3rem;
}

.project-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.project-section p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-medium);
}

.project-section ul {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.project-section li {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-medium);
  margin-bottom: 0.75rem;
}

.project-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 0;
  line-height: 1.6;
  font-weight: 400;
}

.hero .hero-subtitle {
  margin-top: 1rem;
}

/* Footer */
footer {
  background-color: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: 6rem;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  align-items: center;
}

.footer-links a {
  color: var(--text-medium);
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
  opacity: 1;
}

.footer-links span {
  color: var(--border-color);
}

.copyright {
  color: var(--text-light);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.625rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  header {
    padding: 0.75rem 0;
  }
  
  nav {
    padding: 0 1rem;
    position: relative;
  }
  
  main {
    padding: 0 1rem;
  }
  
  /* Mobile Navigation */
  .menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    margin-top: 0.75rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
  }
  
  .nav-links.active {
    max-height: 400px;
    opacity: 1;
  }
  
  .nav-links li {
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-links li:last-child {
    border-bottom: none;
  }
  
  .nav-links a {
    display: block;
    padding: 1rem 1.5rem;
    min-height: 48px;
    font-size: 1rem;
  }
  
  .nav-links a::before {
    content: none;
  }
  
  .hero {
    padding: 4rem 0;
    min-height: 400px;
    background-size: cover;
  }
  
  .hero h1 {
    font-size: 1.875rem;
    margin-bottom: 1.25rem;
  }
  
  .hero .subtitle {
    font-size: 1.0625rem;
    margin-bottom: 2rem;
  }
  
  .button-group {
    flex-direction: column;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .btn {
    width: 100%;
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  /* Improve touch targets on mobile */
  .research-card .btn,
  .project-card .btn,
  .research-item .btn {
    min-height: 52px;
    font-size: 1rem;
  }
  
  /* Ensure all links meet touch target minimum */
  .footer-links a {
    padding: 0.75rem 0.5rem;
    display: inline-block;
    min-height: 48px;
    line-height: 2;
  }
  
  .breadcrumb a {
    padding: 0.75rem 0;
    display: inline-block;
    min-height: 48px;
    line-height: 1.5;
  }
  
  .bio {
    padding: 3rem 0;
  }
  
  .projects-featured {
    padding: 3rem 0;
  }

  .research-featured {
    padding: 3rem 0;
  }
  
  .research-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }
  
  .research-card-image {
    max-width: 200px;
    margin: 0 auto;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-illustration {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .research-item {
    padding: 2rem 1.5rem;
  }
  
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
  
  .research-links {
    flex-direction: column;
  }
  
  .research-links .btn {
    width: 100%;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-card {
    padding: 2rem 1.5rem;
  }
  
  .project-links {
    flex-direction: column;
  }
  
  .project-links .btn {
    width: 100%;
  }
  
  .project-detail {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
  
  nav {
    padding: 0 0.75rem;
  }
  
  main {
    padding: 0 0.75rem;
  }
  
  .hero {
    padding: 3rem 0;
    min-height: 320px;
  }
  
  .hero h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .hero .subtitle,
  .hero .hero-subtitle {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
  }
  
  .logo {
    font-size: 0.9375rem;
  }
  
  .logo img {
    width: 28px;
    height: 28px;
  }
  
  .logo span {
    display: none;
  }
  
  .nav-links a {
    font-size: 0.9375rem;
    padding: 0.875rem 1rem;
  }
  
  section {
    padding: 2.5rem 0;
  }
  
  .bio {
    padding: 2.5rem 0;
  }
  
  .projects-featured {
    padding: 2.5rem 0;
  }
  
  .research-featured {
    padding: 2.5rem 0;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .research-card,
  .research-item,
  .project-card,
  .project-detail {
    padding: 1.5rem 1rem;
  }
  
  .research-card-content h3,
  .research-item h3,
  .project-card h3 {
    font-size: 1.125rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.375rem;
  }
  
  h3 {
    font-size: 1.125rem;
  }
}