/* =====================================================================
   Harshini Vijaya Kumar — portfolio
   Dark, elegant, editorial. Near-black canvas, hairline borders,
   warm-gold accent, Playfair Display serif-italic headings.
   ===================================================================== */

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

:root {
  /* surfaces — sampled near-pure black */
  --bg: #000000;
  --bg-soft: #050506;
  --surface: #0b0b0d;
  --surface-2: #101012;
  --input-bg: #0a0a0a;

  /* text */
  --text: #f4f3f0;
  --text-muted: #9b9b98;
  --text-dim: #5e5e5b;

  /* accent — warm muted gold */
  --accent: #c9a96c;
  --accent-soft: #e2cc97;

  /* lines */
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);

  --nav-h: 62px;
  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 72px);

  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); color: inherit; }

::selection { background: var(--accent); color: #000; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c1c1c; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2a2a2a; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--accent); color: #000; padding: 10px 18px; border-radius: 0 0 8px 0;
  font-size: 0.85rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* =====================  NAV  ===================== */
.nav-wrap {
  position: fixed; inset: 14px 0 auto 0; z-index: 1000;
  display: flex; justify-content: center;
  padding: 0 16px; pointer-events: none;
}
nav {
  width: 100%; max-width: 1180px; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px 0 28px;
  background: rgba(10,10,11,0.6);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: 999px;
  pointer-events: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  transition: background 0.3s, border-color 0.3s;
}
.nav-logo {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: 1.18rem; letter-spacing: 0.01em; color: var(--text);
  white-space: nowrap;
}
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a {
  font-size: 0.9rem; font-weight: 400; color: var(--text-muted);
  position: relative; transition: color 0.2s; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--accent); transition: width 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-resume {
  font-size: 0.85rem; font-weight: 500; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 9px 20px; transition: all 0.2s; white-space: nowrap;
}
.nav-resume:hover { background: var(--accent); border-color: var(--accent); color: #000; }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================  HERO  ===================== */
#hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; background: #000;
  padding: 0 24px;
}
/* animated aurora */
.aurora {
  position: absolute; inset: -25%; z-index: 0; filter: blur(70px); opacity: 0.6;
  background:
    radial-gradient(38% 48% at 28% 32%, rgba(201,169,108,0.50), transparent 70%),
    radial-gradient(34% 44% at 72% 38%, rgba(150,86,40,0.42), transparent 70%),
    radial-gradient(46% 52% at 52% 76%, rgba(110,74,150,0.26), transparent 72%),
    radial-gradient(40% 40% at 85% 80%, rgba(60,90,120,0.22), transparent 70%);
  animation: drift 20s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(-3%,-2%,0) scale(1);    }
  50%  { transform: translate3d(3%,2%,0)  scale(1.12);  }
  100% { transform: translate3d(-2%,3%,0) scale(1.06);  }
}
.grain {
  position: absolute; inset: 0; z-index: 2; opacity: 0.05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* real photo layer — transparent until images/hero.jpg exists, then covers the aurora */
.hero-photo {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: url('images/hero.jpg');
  background-size: cover; background-position: center;
}
/* light-touch overlay: keeps the photo bright, soft scrim only behind the name */
.hero-overlay {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.50) 0%, rgba(0,0,0,0.30) 38%, rgba(0,0,0,0.72) 100%),
    radial-gradient(circle at 50% 44%, transparent 32%, rgba(0,0,0,0.45) 100%);
}

.hero-content { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; }
.hero-eyebrow {
  font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: rgba(255,255,255,0.88); margin-bottom: 22px; font-weight: 500;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.hero-name {
  font-size: clamp(2.9rem, 8.5vw, 7rem); line-height: 1; color: #fff;
  margin-bottom: 22px; text-shadow: 0 2px 10px rgba(0,0,0,0.45), 0 8px 50px rgba(0,0,0,0.55);
}
.hero-name.serif { font-family: var(--serif); font-style: italic; font-weight: 600; letter-spacing: 0.005em; }
.hero-sub {
  font-size: clamp(0.85rem, 2vw, 1.02rem); color: rgba(255,255,255,0.82);
  letter-spacing: 0.04em; margin-bottom: 38px; text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.hero-explore {
  display: inline-flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,0.06); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.28); color: #fff;
  padding: 12px 28px; font-size: 0.8rem; letter-spacing: 0.08em; font-weight: 500;
  border-radius: 999px; transition: all 0.3s;
}
.hero-explore:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.55); }
.hero-explore svg { transition: transform 0.3s; }
.hero-explore:hover svg { transform: translateY(3px); }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 3; color: rgba(255,255,255,0.45); animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%     { transform: translateX(-50%) translateY(6px); }
}

/* =====================  SECTION SHELL  ===================== */
section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 11vw, 150px) var(--pad);
}
.section-label {
  display: inline-block; font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 600; margin-bottom: 22px;
  padding: 6px 15px; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255,255,255,0.02);
}
.section-heading {
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.05; color: var(--text); margin-bottom: 56px;
}
.section-heading.serif {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: clamp(2.6rem, 5.5vw, 4.6rem); letter-spacing: 0;
}
.muted { color: var(--text-dim); }

/* =====================  ABOUT  ===================== */
.about-grid { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(36px, 5vw, 72px); align-items: start; }

.about-photo {
  width: 100%; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden;
  margin-bottom: 26px; border: 1px solid var(--border);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #14110b 0%, #1b1409 55%, #0a0a0a 100%);
  color: var(--text-dim); font-size: 0.85rem; letter-spacing: 0.06em;
}
.about-text p { font-size: 1.02rem; color: var(--text-muted); line-height: 1.85; margin-bottom: 16px; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-text em { color: var(--text); font-style: italic; }

.about-accordion {
  background: rgba(255,255,255,0.015); border: 1px solid var(--border);
  border-radius: 18px; padding: 8px 26px;
}
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: none; }
.acc-header { width: 100%; display: flex; align-items: center; gap: 14px; padding: 22px 2px; text-align: left; }
.acc-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.acc-label { font-size: 1.04rem; font-weight: 500; color: var(--text); }
.acc-count { font-size: 0.82rem; color: var(--text-dim); }
.acc-toggle {
  margin-left: auto; font-size: 1.4rem; font-weight: 300; color: var(--text-dim);
  line-height: 1; transition: transform 0.3s, color 0.2s;
}
.acc-header:hover .acc-toggle { color: var(--accent); }
.acc-item.open .acc-toggle { transform: rotate(45deg); color: var(--accent); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease; }
.acc-item.open .acc-body { max-height: 640px; padding-bottom: 20px; }
.acc-entry { padding: 11px 0 11px 22px; border-left: 1px solid var(--border); margin: 0 0 4px 3px; }
.acc-entry-title { font-size: 0.92rem; color: var(--text); font-weight: 500; line-height: 1.5; margin-bottom: 3px; }
.acc-entry-meta { font-size: 0.8rem; color: var(--text-dim); line-height: 1.5; }
.acc-entry-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.65; margin-top: 7px; }

/* =====================  PUBLICATIONS  ===================== */
#publications { border-top: 1px solid var(--border); }
.pub-layout { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.pub-head { position: sticky; top: 100px; }
.pub-head .section-heading { margin-bottom: 20px; }
.pub-intro { color: var(--text-muted); font-size: 0.95rem; max-width: 320px; }
.pub-list { display: flex; flex-direction: column; gap: 14px; }
.pub-item {
  padding: 30px 32px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; transition: border-color 0.3s, transform 0.3s;
}
.pub-item:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.pub-venue { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.pub-title { font-size: 1.12rem; font-weight: 600; color: var(--text); line-height: 1.4; margin-bottom: 10px; }
.pub-authors { font-size: 0.85rem; color: var(--text-muted); font-style: italic; margin-bottom: 18px; }
.pub-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pub-link {
  font-size: 0.74rem; letter-spacing: 0.04em; font-weight: 500; color: var(--text-muted);
  padding: 7px 16px; border: 1px solid var(--border); border-radius: 999px; transition: all 0.2s;
}
.pub-link:hover { border-color: var(--accent); color: var(--accent); }
.pub-placeholder { border-style: dashed; opacity: 0.55; }

/* =====================  PROJECTS  ===================== */
#projects { border-top: 1px solid var(--border); max-width: none; padding-left: 0; padding-right: 0; }
.projects-head, #projects .scroll-hint { max-width: var(--maxw); margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }
.projects-head .section-heading { margin-bottom: 28px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab-btn {
  padding: 10px 20px; font-size: 0.82rem; letter-spacing: 0.02em; font-weight: 500;
  color: var(--text-dim); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.2s;
}
.tab-btn:hover { color: var(--text-muted); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.projects-track {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 30px var(--pad) 8px; scrollbar-width: thin; scrollbar-color: #1c1c1c transparent;
}
.projects-track::-webkit-scrollbar { height: 7px; }
.projects-track::-webkit-scrollbar-track { background: transparent; }
.projects-track::-webkit-scrollbar-thumb { background: #1c1c1c; border-radius: 4px; }
.project-card {
  flex: 0 0 360px; width: 360px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; transition: transform 0.3s, border-color 0.3s;
}
.project-card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.project-img-placeholder {
  width: 100%; height: 200px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #131313 0%, #1b1308 100%);
  color: var(--text-dim); font-size: 0.78rem; letter-spacing: 0.04em;
}
.project-img { width: 100%; height: 200px; object-fit: cover; filter: brightness(0.9) saturate(0.95); transition: filter 0.3s; }
.project-card:hover .project-img { filter: brightness(1) saturate(1); }
.project-body { padding: 22px; }
.project-badge { display: inline-block; font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.project-title { font-size: 1.04rem; font-weight: 600; color: var(--text); line-height: 1.3; margin-bottom: 10px; }
.project-desc { font-size: 0.86rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.project-tag { font-size: 0.68rem; padding: 4px 11px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-muted); border-radius: 999px; }
.project-links { display: flex; gap: 14px; }
.project-link { font-size: 0.76rem; font-weight: 500; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; transition: color 0.2s; }
.project-link:hover { color: var(--accent); }
.project-link svg { width: 13px; height: 13px; }

.project-card-add { display: flex; align-items: center; justify-content: center; border-style: dashed; background: transparent; }
.project-add-inner { text-align: center; color: var(--text-dim); }
.project-add-plus { font-size: 2.4rem; font-weight: 200; line-height: 1; margin-bottom: 8px; }
.project-add-text { font-size: 0.8rem; letter-spacing: 0.04em; }

.scroll-hint { font-size: 0.78rem; color: var(--text-dim); letter-spacing: 0.04em; margin-top: 14px; }

/* =====================  GALLERY  ===================== */
#gallery { border-top: 1px solid var(--border); }
.gallery-tabs { margin-bottom: 32px; display: inline-flex; }
.gallery-grid { columns: 5; column-gap: 8px; }
.gallery-item {
  break-inside: avoid; margin-bottom: 8px; overflow: hidden; border-radius: 9px;
  border: 1px solid var(--border); position: relative;
}
.gallery-item img { width: 100%; display: block; filter: brightness(0.88) saturate(0.8); transition: all 0.4s; }
.gallery-item:hover img { filter: brightness(1) saturate(1); transform: scale(1.03); }
.gallery-placeholder {
  width: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #141414 0%, #0c0c0c 100%);
  color: var(--text-dim); font-size: 0.72rem; letter-spacing: 0.04em;
}
.gallery-placeholder.tall { height: 280px; }
.gallery-placeholder.medium { height: 200px; }
.gallery-placeholder.short { height: 150px; }
.gallery-note { margin-top: 28px; font-size: 0.82rem; color: var(--text-dim); text-align: center; }
.gallery-note code { color: var(--accent); }

/* =====================  CONTACT  ===================== */
#contact { border-top: 1px solid var(--border); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 5vw, 72px); align-items: start; max-width: 1080px; }
.contact-text { padding-top: 6px; }
.contact-text p { font-size: 0.98rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 30px; max-width: 420px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.social-link {
  font-size: 0.8rem; font-weight: 500; color: var(--text-muted);
  padding: 9px 18px; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255,255,255,0.02); transition: all 0.2s;
}
.social-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.contact-form { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 30px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; }
.form-input, .form-textarea {
  background: var(--input-bg); border: 1px solid var(--border); color: var(--text);
  padding: 13px 15px; font-size: 0.9rem; font-family: var(--font); border-radius: 10px;
  outline: none; transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { min-height: 120px; resize: vertical; }
::placeholder { color: var(--text-dim); }
.form-submit {
  background: var(--accent); color: #000; padding: 14px 28px; font-size: 0.82rem;
  letter-spacing: 0.04em; font-weight: 600; border-radius: 10px; width: 100%; margin-top: 4px;
  transition: background 0.2s, transform 0.2s;
}
.form-submit:hover { background: var(--accent-soft); transform: translateY(-1px); }

/* =====================  FOOTER  ===================== */
footer {
  border-top: 1px solid var(--border); max-width: var(--maxw); margin: 0 auto;
  padding: 28px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-copy { font-size: 0.8rem; color: var(--text-dim); }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 0.8rem; color: var(--text-dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* =====================  REVEAL ANIMATION  ===================== */
.fade-in { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* =====================  RESPONSIVE  ===================== */
@media (max-width: 980px) {
  .nav-links, .nav-resume { display: none; }
  .nav-hamburger { display: flex; }
  nav { padding: 0 10px 0 22px; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 18px; list-style: none;
    position: fixed; top: calc(var(--nav-h) + 22px); left: 16px; right: 16px;
    background: rgba(10,10,11,0.97); backdrop-filter: blur(18px);
    border: 1px solid var(--border); border-radius: 18px; padding: 24px;
  }
  .about-grid { grid-template-columns: 1fr; gap: 44px; }
  .about-photo { max-width: 360px; }
  .pub-layout { grid-template-columns: 1fr; gap: 36px; }
  .pub-head { position: static; }
  .contact-inner { grid-template-columns: 1fr; gap: 36px; }
  .gallery-grid { columns: 3; }
}
@media (max-width: 620px) {
  .gallery-grid { columns: 2; }
  .project-card { flex-basis: 80vw; width: 80vw; }
  .footer { flex-direction: column; text-align: center; }
  footer { flex-direction: column; gap: 14px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; }
}
