/* ===================================================
   INDUDHARA HAVALDAR — PORTFOLIO
   style.css
   =================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: only light;
  --teal: #0D6E6E;
  --teal-hover: #0A5858;
  --teal-mist: #E8F4F4;
  --teal-faint: #F2FAFA;
  --ink: #111714;
  --ink-mid: #3D4A45;
  --ink-soft: #6B7872;
  --ink-muted: #9AADA7;
  --paper: #FAFCFB;
  --paper-warm: #F5F8F7;
  --white: #FFFFFF;
  --rule: #E2EEEC;
  --dark: #111714;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; background: #FAFCFB; }
@media (prefers-color-scheme: dark) {
  html { background: #FAFCFB !important; }
  body { background: #FAFCFB !important; color: #111714 !important; }
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  background: rgba(250,252,251,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--rule); }
.nav-logo {
  font-family: var(--serif); font-size: 20px;
  color: var(--ink); text-decoration: none; letter-spacing: -0.02em;
}
.nav-logo span { color: var(--teal); }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a { font-size: 14px; color: var(--ink-soft); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--teal); }
.nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink-soft); text-decoration: none; transition: color 0.2s;
}
.nav-back:hover { color: var(--teal); }

/* ---- BUTTONS ---- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: var(--teal); color: #fff;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  text-decoration: none; border-radius: 6px;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--teal-hover); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; color: var(--teal);
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  text-decoration: none; border: 1.5px solid var(--rule); border-radius: 6px;
  background: transparent; transition: border-color 0.2s, transform 0.15s;
}
.btn-secondary:hover { border-color: var(--teal); transform: translateY(-1px); }

/* ---- SECTION BASICS ---- */
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 16px;
}
.section-label::before { content: ''; display: block; width: 20px; height: 1.5px; background: var(--teal); }
.section-title {
  font-family: var(--serif); font-size: clamp(32px,4vw,48px);
  letter-spacing: -0.025em; line-height: 1.1; color: var(--ink); margin-bottom: 16px;
}
.tag {
  font-size: 11px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--teal);
  background: var(--teal-mist); padding: 4px 10px; border-radius: 20px;
}

/* ===================================================
   HOME PAGE
   =================================================== */
.hero {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; padding: 120px 48px 80px; gap: 64px;
  background: var(--paper); position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -20%; right: -10%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(13,110,110,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-left { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 28px;
  opacity: 0; animation: fadeUp 0.7s ease 0.1s forwards;
}
.hero-eyebrow::before { content: ''; display: block; width: 28px; height: 1.5px; background: var(--teal); }
.hero-name {
  font-family: var(--serif); font-size: clamp(44px,6vw,80px);
  line-height: 1.05; letter-spacing: -0.03em; color: var(--ink);
  margin-bottom: 20px; opacity: 0; animation: fadeUp 0.8s ease 0.2s forwards;
}
.hero-name em { font-style: italic; color: var(--teal); }
.hero-desc {
  font-size: 18px; font-weight: 300; line-height: 1.65; color: var(--ink-mid);
  max-width: 480px; margin-bottom: 44px;
  opacity: 0; animation: fadeUp 0.8s ease 0.35s forwards;
}
.hero-ctas {
  display: flex; gap: 16px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.8s ease 0.5s forwards;
}
.hero-right { position: relative; z-index: 1; opacity: 0; animation: fadeIn 1s ease 0.6s forwards; }
.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--rule); border-radius: 16px; overflow: hidden; border: 1px solid var(--rule);
}
.stat-card { background: var(--white); padding: 32px 28px; transition: background 0.2s; }
.stat-card:hover { background: var(--teal-faint); }
.stat-card:nth-child(1) { border-radius: 14px 0 0 0; }
.stat-card:nth-child(2) { border-radius: 0 14px 0 0; }
.stat-card:nth-child(3) { border-radius: 0 0 0 14px; }
.stat-card:nth-child(4) { border-radius: 0 0 14px 0; }
.stat-number { font-family: var(--serif); font-size: 40px; color: var(--teal); line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }

/* WORK SECTION */
#work { background: var(--paper-warm); padding: 100px 48px; }
.work-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 24px; margin-bottom: 64px;
}
.work-subtitle { font-size: 15px; font-weight: 300; color: var(--ink-mid); max-width: 320px; line-height: 1.65; }
.case-studies { display: flex; flex-direction: column; gap: 2px; }
.case-card {
  display: grid; grid-template-columns: 80px 1fr auto;
  align-items: center; gap: 40px; padding: 40px 48px;
  background: var(--white); text-decoration: none; color: var(--ink);
  position: relative; overflow: hidden; transition: background 0.2s;
}
.case-card:first-child { border-radius: 12px 12px 0 0; }
.case-card:last-child { border-radius: 0 0 12px 12px; }
.case-card::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--teal); transform: scaleY(0); transform-origin: center; transition: transform 0.25s ease;
}
.case-card:hover { background: var(--teal-faint); }
.case-card:hover::after { transform: scaleY(1); }
.case-number { font-family: var(--serif); font-size: 13px; color: var(--ink-muted); font-style: italic; }
.case-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.case-title { font-family: var(--serif); font-size: 26px; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 8px; line-height: 1.2; }
.case-desc { font-size: 15px; color: var(--ink-soft); font-weight: 300; line-height: 1.55; max-width: 560px; }
.case-meta { text-align: right; flex-shrink: 0; }
.case-role { font-size: 12px; color: var(--ink-muted); margin-bottom: 4px; }
.case-company { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.case-arrow {
  display: block; margin-top: 16px; color: var(--teal); font-size: 20px;
  opacity: 0; transform: translateX(-6px); transition: opacity 0.2s, transform 0.2s;
}
.case-card:hover .case-arrow { opacity: 1; transform: translateX(0); }

/* ABOUT SECTION */
#about { background: var(--paper); display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; padding: 100px 48px; }
.about-text p { font-size: 16px; font-weight: 300; color: var(--ink-mid); line-height: 1.75; margin-bottom: 20px; }
.about-text p strong { color: var(--ink); font-weight: 500; }
.about-skills { margin-top: 36px; }
.skills-label { font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 16px; }
.skills-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-chip {
  font-size: 13px; color: var(--ink-mid); border: 1px solid var(--rule);
  padding: 6px 14px; border-radius: 20px; background: var(--white);
  transition: border-color 0.2s, color 0.2s;
}
.skill-chip:hover { border-color: var(--teal); color: var(--teal); }
.experience-list { display: flex; flex-direction: column; }
.exp-item {
  padding: 28px 0; border-bottom: 1px solid var(--rule);
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start;
}
.exp-item:first-child { padding-top: 0; }
.exp-item:last-child { border-bottom: none; padding-bottom: 0; }
.exp-role { font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.exp-company { font-size: 13px; color: var(--ink-soft); }
.exp-years { font-size: 12px; color: var(--ink-muted); white-space: nowrap; margin-top: 2px; }

/* CONTACT SECTION */
#contact { background: var(--dark); text-align: center; padding: 100px 48px; }
#contact .section-label { color: #0F8080; }
#contact .section-label::before { background: #0F8080; }
#contact .section-title { color: #fff; margin-bottom: 20px; }
.contact-desc {
  font-size: 17px; font-weight: 300; color: rgba(255,255,255,0.55);
  max-width: 480px; margin: 0 auto 48px; line-height: 1.65;
}
.contact-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.contact-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; font-size: 14px; font-weight: 500;
  text-decoration: none; border-radius: 6px; font-family: var(--sans); transition: all 0.2s;
}
.contact-link.primary { background: var(--teal); color: #fff; }
.contact-link.primary:hover { background: var(--teal-hover); transform: translateY(-1px); }
.contact-link.ghost { color: rgba(255,255,255,0.7); border: 1.5px solid rgba(255,255,255,0.15); }
.contact-link.ghost:hover { color: #fff; border-color: rgba(255,255,255,0.4); transform: translateY(-1px); }

/* FOOTER */
footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 24px 48px;
  display: flex; justify-content: space-between; align-items: center;
}
footer p { font-size: 13px; color: rgba(255,255,255,0.3); }
footer a { font-size: 13px; color: rgba(255,255,255,0.3); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: #0F8080; }

/* ===================================================
   CASE STUDY PAGES — SHARED
   =================================================== */
.case-hero { padding: 140px 48px 80px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.case-hero-inner { max-width: 860px; margin: 0 auto; }
.breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-muted); margin-bottom: 32px;
  opacity: 0; animation: fadeUp 0.6s ease 0.1s forwards;
}
.breadcrumb a { color: var(--teal); text-decoration: none; }
.case-tags-hero {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
  opacity: 0; animation: fadeUp 0.6s ease 0.15s forwards;
}
.case-title-hero {
  font-family: var(--serif); font-size: clamp(36px,5vw,64px);
  letter-spacing: -0.03em; line-height: 1.05; color: var(--ink);
  margin-bottom: 24px; opacity: 0; animation: fadeUp 0.7s ease 0.2s forwards;
}
.case-title-hero em { font-style: italic; color: var(--teal); }
.case-subtitle-hero {
  font-size: 19px; font-weight: 300; color: var(--ink-mid); line-height: 1.65;
  max-width: 640px; margin-bottom: 48px;
  opacity: 0; animation: fadeUp 0.7s ease 0.3s forwards;
}
.case-meta-strip {
  display: grid; grid-template-columns: repeat(4,1fr);
  border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
  opacity: 0; animation: fadeUp 0.7s ease 0.4s forwards;
}
.meta-item { padding: 20px 24px; border-right: 1px solid var(--rule); background: var(--white); }
.meta-item:last-child { border-right: none; }
.meta-label { font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.meta-value { font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.3; }

/* Case study content */
.case-content { max-width: 860px; margin: 0 auto; padding: 80px 48px; }
.cs-section {
  margin-bottom: 80px;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.cs-section.visible { opacity: 1; transform: translateY(0); }
.cs-section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 16px;
}
.cs-section-label::before { content: ''; display: block; width: 20px; height: 1.5px; background: var(--teal); }
.cs-heading {
  font-family: var(--serif); font-size: clamp(26px,3vw,36px);
  letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); margin-bottom: 20px;
}
.cs-body { font-size: 16px; font-weight: 300; color: var(--ink-mid); line-height: 1.8; margin-bottom: 20px; }
.cs-body strong { color: var(--ink); font-weight: 500; }

/* Quote */
.cs-quote { margin: 36px 0; padding: 28px 36px; border-left: 3px solid var(--teal); background: var(--teal-faint); border-radius: 0 8px 8px 0; }
.cs-quote p { font-family: var(--serif); font-size: 20px; font-style: italic; color: var(--ink-mid); line-height: 1.5; margin-bottom: 10px; }
.cs-quote cite { font-size: 13px; color: var(--ink-muted); font-style: normal; }

/* Callout */
.cs-callout { margin: 28px 0; padding: 20px 24px; background: var(--teal-mist); border-radius: 8px; display: flex; gap: 14px; align-items: flex-start; }
.cs-callout-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.cs-callout p { font-size: 15px; color: var(--ink-mid); line-height: 1.65; }
.cs-callout p strong { color: var(--teal); }

/* Insight cards */
.cs-insights { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.cs-insight-card { padding: 24px; background: var(--white); border: 1px solid var(--rule); border-radius: 10px; transition: border-color 0.2s, box-shadow 0.2s; }
.cs-insight-card:hover { border-color: var(--teal); box-shadow: 0 4px 20px rgba(13,110,110,0.06); }
.cs-insight-label { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.cs-insight-card p { font-size: 15px; color: var(--ink-mid); line-height: 1.6; font-weight: 300; }
.cs-insight-card p strong { color: var(--ink); font-weight: 500; }

/* Persona cards */
.cs-personas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.persona-card { padding: 24px; border: 1px solid var(--rule); border-radius: 10px; background: var(--white); transition: border-color 0.2s; }
.persona-card:hover { border-color: var(--teal); }
.persona-name { font-family: var(--serif); font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.persona-role { font-size: 12px; color: var(--teal); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.persona-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; font-weight: 300; }

/* Routes / flow list */
.cs-routes, .cs-flow { display: flex; flex-direction: column; margin: 28px 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.cs-route, .cs-flow-item { display: flex; align-items: flex-start; gap: 20px; padding: 20px 24px; border-bottom: 1px solid var(--rule); background: var(--white); transition: background 0.2s; }
.cs-route:last-child, .cs-flow-item:last-child { border-bottom: none; }
.cs-route:hover, .cs-flow-item:hover { background: var(--teal-faint); }
.route-num { font-family: var(--serif); font-size: 22px; color: var(--teal); flex-shrink: 0; line-height: 1; margin-top: 2px; }
.flow-step { font-family: var(--serif); font-size: 13px; color: var(--teal); flex-shrink: 0; width: 36px; font-style: italic; }
.route-title, .flow-title { font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.route-desc, .flow-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.5; font-weight: 300; }

/* Screen list */
.cs-screens { display: flex; flex-direction: column; margin: 28px 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.cs-screen-item { display: flex; align-items: flex-start; gap: 20px; padding: 18px 24px; border-bottom: 1px solid var(--rule); background: var(--white); transition: background 0.2s; }
.cs-screen-item:last-child { border-bottom: none; }
.cs-screen-item:hover { background: var(--teal-faint); }
.screen-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex-shrink: 0; margin-top: 6px; }
.screen-name { font-size: 15px; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.screen-desc { font-size: 14px; color: var(--ink-soft); font-weight: 300; line-height: 1.5; }

/* Data table */
.cs-table { width: 100%; border-collapse: collapse; margin: 28px 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--rule); }
.cs-table th { background: var(--teal-mist); color: var(--teal); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--rule); }
.cs-table td { padding: 14px 16px; font-size: 14px; color: var(--ink-mid); font-weight: 300; border-bottom: 1px solid var(--rule); background: var(--white); line-height: 1.5; }
.cs-table tr:last-child td { border-bottom: none; }
.cs-table tr:hover td { background: var(--teal-faint); }
.cs-table td:first-child { font-weight: 500; color: var(--ink); }

/* Image — real images + placeholder fallback */
.cs-img-block { margin: 36px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--rule); background: var(--paper-warm); }
.cs-img-block img { width: 100%; height: auto; display: block; }
.cs-img-block.tall img { min-height: 400px; object-fit: cover; }
.cs-img-caption { font-size: 13px; color: var(--ink-muted); padding: 12px 16px; text-align: center; background: var(--paper-warm); border-top: 1px solid var(--rule); }

/* Divider */
.cs-divider { border: none; border-top: 1px solid var(--rule); margin: 60px 0; }

/* Outcome */
.cs-outcome { padding: 36px 40px; background: var(--dark); border-radius: 12px; margin: 28px 0; }
.cs-outcome p { font-size: 18px; font-weight: 300; color: rgba(255,255,255,0.85); line-height: 1.7; }
.cs-outcome p strong { color: #fff; font-weight: 500; }

/* Reflection */
.cs-reflection { padding: 32px 36px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper-warm); position: relative; }
.cs-reflection::before { content: 'Reflection'; position: absolute; top: -10px; left: 24px; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); background: var(--paper-warm); padding: 0 8px; }
.cs-reflection p { font-size: 15px; color: var(--ink-mid); line-height: 1.75; font-weight: 300; margin-bottom: 16px; }
.cs-reflection p:last-child { margin-bottom: 0; }

/* Case nav */
.case-nav { border-top: 1px solid var(--rule); padding: 48px; max-width: 860px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.case-nav-back { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); text-decoration: none; transition: color 0.2s; }
.case-nav-back:hover { color: var(--teal); }
.case-nav-next { display: inline-flex; flex-direction: column; align-items: flex-end; text-decoration: none; gap: 4px; }
.case-nav-next span:first-child { font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); }
.case-nav-next span:last-child { font-family: var(--serif); font-size: 20px; color: var(--ink); transition: color 0.2s; }
.case-nav-next:hover span:last-child { color: var(--teal); }

/* ===================================================
   ANIMATIONS + REVEAL
   =================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  .nav-links { gap: 20px; }
  .hero { grid-template-columns: 1fr; padding: 100px 24px 60px; gap: 48px; }
  .hero::before { display: none; }
  #work, #about { padding: 72px 24px; }
  #contact { padding: 72px 24px; }
  footer { padding: 20px 24px; flex-direction: column; gap: 8px; text-align: center; }
  #about { grid-template-columns: 1fr; gap: 48px; }
  .work-header { flex-direction: column; align-items: flex-start; }
  .case-card { grid-template-columns: 1fr; gap: 16px; padding: 28px 24px; }
  .case-number, .case-arrow { display: none; }
  .case-meta { text-align: left; }
  .case-hero { padding: 110px 24px 60px; }
  .case-meta-strip { grid-template-columns: 1fr 1fr; }
  .meta-item:nth-child(2) { border-right: none; }
  .meta-item:nth-child(3) { border-top: 1px solid var(--rule); }
  .meta-item:nth-child(4) { border-top: 1px solid var(--rule); border-right: none; }
  .case-content { padding: 60px 24px; }
  .cs-insights, .cs-personas { grid-template-columns: 1fr; }
  .case-nav { padding: 40px 24px; }
}
