/* CSS Variables */
:root {
  /* Colors */
  --green: #7A9A6F;
  --green-light: #9ab891;
  --green-dark: #5a7a4f;
  --terracotta: #9E4E5A;
  --terracotta-light: #c47280;
  --terracotta-dark: #7e3e4a;
  
  --bg-primary: #faf8f5;
  --bg-secondary: #f2efe9;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  
  /* Typography */
  --font-main: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --section-gap: 100px;
  --container-width: 900px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
}

/* Subtle Grain Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Subtle Background Shapes */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
}

.bg-shape-1 {
  width: 500px;
  height: 500px;
  background: var(--green);
  top: -250px;
  right: -150px;
}

.bg-shape-2 {
  width: 400px;
  height: 400px;
  background: var(--terracotta);
  bottom: -200px;
  left: -100px;
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

/* ===========================================
   HERO SECTION
   =========================================== */
.hero {
  padding: 80px 0 60px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}

.hero-text {
  position: relative;
}

.name {
  font-family: var(--font-main);
  font-size: 42px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.bio {
  max-width: 520px;
}

.bio p {
  margin-bottom: 14px;
  color: var(--text-secondary);
}

.bio strong {
  color: var(--text-primary);
  font-weight: 600;
}

.bio a {
  color: var(--terracotta);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition-fast);
}

.bio a:hover {
  border-bottom-color: var(--terracotta);
}

.personal-note {
  font-style: italic;
  color: var(--text-muted) !important;
  font-size: 15px;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: transparent;
  border: 1.5px solid var(--text-secondary);
  border-radius: 100px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.social-icon {
  font-size: 13px;
}

/* Hero Image - Clean Circle */
.hero-image {
  position: relative;
}

.image-frame {
  position: relative;
  width: 250px;
  height: 250px;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   PUBLICATIONS SECTION
   =========================================== */
.publications {
  padding: var(--section-gap) 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.section-header h2 {
  font-family: var(--font-main);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(26, 26, 26, 0.2), transparent);
}

/* Publication Grid */
.pub-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Publication Card */
.pub-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 24px;
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.pub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--green);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: var(--transition-medium);
}

.pub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.pub-card:hover::before {
  transform: scaleY(1);
}

/* Featured Card */
.pub-card-featured {
  background: linear-gradient(135deg, rgba(158, 78, 90, 0.08) 0%, rgba(122, 154, 111, 0.08) 100%);
  border: 1px solid rgba(158, 78, 90, 0.2);
}

.pub-card-featured::before {
  background: var(--terracotta);
}

/* Publication Image */
.pub-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.pub-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-medium);
}

.pub-card:hover .pub-image img {
  transform: scale(1.03);
}

.pub-year {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--text-primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}

/* Publication Content */
.pub-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pub-venue {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 10px;
}

.pub-title {
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.pub-authors {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.pub-authors strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pub-authors a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.pub-authors a:hover {
  color: var(--green);
}

/* Publication Links */
.pub-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pub-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--green-dark);
  text-decoration: none;
  padding: 5px 12px;
  background: rgba(122, 154, 111, 0.12);
  border-radius: 100px;
  transition: var(--transition-fast);
}

.pub-links a:hover {
  background: var(--green);
  color: white;
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
  padding: 48px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-content {
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--terracotta);
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
  
  .hero {
    padding: 60px 0 40px;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .bio {
    max-width: 100%;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .hero-image {
    order: -1;
    display: flex;
    justify-content: center;
  }
  
  .image-frame {
    width: 160px;
    height: 160px;
  }
  
  .name {
    font-size: 36px;
  }
  
  .pub-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .pub-image {
    max-width: 100%;
  }
  
  .section-header h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  :root {
    --section-gap: 60px;
  }
  
  body {
    font-size: 15px;
  }
  
  .name {
    font-size: 32px;
  }
  
  .social-link {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  .pub-card {
    padding: 18px;
  }
  
  .pub-title {
    font-size: 16px;
  }
}

/* ===========================================
   SUBTLE ANIMATIONS ON LOAD
   =========================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.name {
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

.bio {
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.social-links {
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.hero-image {
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 0.15s;
  opacity: 0;
}