/* ============================================================
   Ashvin K S — Minimalist Typographic Resume Portfolio
   Aesthetic: Premium Editorial / Matte Graphite & Antique Gold
   Typography: Space Grotesk (Clean Sans) & Lora (Refined Serif)
   ============================================================ */

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

:root {
  /* Rich Matte Graphite Canvas */
  --bg:           #0b0c0e;
  --bg-tint:      #111215;
  --bg-hover:     #16181c;
  
  /* Primary Antique Gold Accent */
  --accent:       #d4b28c;
  --accent-rgb:   212, 178, 140;
  --accent-light: rgba(212, 178, 140, 0.05);
  
  /* Semantic Terracotta for highlights */
  --terracotta:   #c87a53;
  
  /* Typography Colors */
  --fg:           #e4e4e7;      /* Soft zinc cream white */
  --fg-muted:     #9f9fa6;      /* Muted zinc grey */
  --fg-dark:      #4b4c52;      /* Deep graphite gray */
  
  /* Precision Editorial Borders */
  --border:       rgba(228, 228, 231, 0.05);
  --border-light: rgba(228, 228, 231, 0.02);
  --border-hover: rgba(212, 178, 140, 0.25);
  
  /* Typography paired for ultimate legibility */
  --sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --serif: 'Lora', Georgia, serif;
  --mono: 'JetBrains Mono', monospace;
  
  /* Layout constraints */
  --mw: 920px; /* Slimmer, highly focused column width for optimal readability */
  --nav-h: 70px;
}

/* ── Base ───────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

/* Minimal technical scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: #1e2025;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: var(--mw);
  margin: 0 auto;
  padding: 0 32px;
}

.mono {
  font-family: var(--mono);
}

/* ── Monograph Container ───────────────────────────────────── */
.monograph-canvas {
  position: relative;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ── Navigation ───────────────────────────────────────────── */
.zine-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(11, 12, 14, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--mw);
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
}

.logo-serif {
  font-family: var(--serif);
  font-style: italic;
  color: #ffffff;
}

.nav-links {
  display: flex;
  gap: 16px;
}

.nav-links a {
  font-size: 13px;
  color: var(--fg-muted);
  padding: 4px 10px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--fg);
}

.nav-cta {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  border: 1.5px solid var(--border);
  padding: 6px 14px;
  transition: all 0.2s;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ── Hero / Profile Summary ────────────────────────────────── */
.zine-hero {
  padding: calc(var(--nav-h) + 80px) 0 60px;
  border-bottom: 1px solid var(--border);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.label-mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
}

.hero-dot {
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
}

.hero-headline {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: #ffffff;
  max-width: 820px;
  margin-bottom: 28px;
}

.hero-narrative {
  max-width: 680px;
  margin-bottom: 36px;
}

.narrative-main {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-muted);
}

.narrative-main strong {
  color: var(--fg);
  font-weight: 500;
}

.narrative-muted {
  font-size: 14.5px;
  margin-top: 12px;
}

.hero-links {
  display: flex;
  gap: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.text-link {
  font-size: 13px;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.text-link:hover {
  color: var(--accent);
}

/* ── Sections Structure ─────────────────────────────────────── */
.zine-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.section-tinted {
  background: var(--bg-tint);
}

.section-heading {
  margin-bottom: 48px;
}

.heading-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--fg-dark);
  margin-bottom: 6px;
}

.heading-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 450;
  letter-spacing: 0;
  color: #ffffff;
}

/* ── Module 01: Professional Timeline (Experience) ────────── */
.timeline-list {
  display: flex;
  flex-direction: column;
}

.timeline-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s, padding-left 0.2s;
}

.timeline-row:first-child {
  border-top: 1px solid var(--border);
}

.timeline-row:hover {
  background: rgba(212, 178, 140, 0.01);
  padding-left: 12px;
  border-bottom-color: var(--border-hover);
}

.time-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dark);
}

.timeline-row:hover .time-date {
  color: var(--accent);
}

.time-org {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: #ffffff;
}

.time-role {
  font-size: 13px;
  color: var(--fg-muted);
}

.time-body {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 620px;
  display: flex;
  align-items: center;
}

/* ── Module 02: Catalog Index Layout (Projects) ────────────── */
.catalog-index {
  display: flex;
  flex-direction: column;
}

.catalog-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s, padding-left 0.2s;
}

.catalog-row:first-child {
  border-top: 1px solid var(--border);
}

.catalog-row:hover {
  background: rgba(212, 178, 140, 0.01);
  padding-left: 12px;
  border-bottom-color: var(--border-hover);
}

.row-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dark);
}

.catalog-row:hover .row-num {
  color: var(--accent);
}

.row-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: #ffffff;
}

.row-category {
  font-size: 12.5px;
  color: var(--fg-muted);
}

.row-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}

.row-desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 620px;
}

.row-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tech-stack-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-dark);
}

.catalog-row:hover .tech-stack-label {
  color: var(--fg-muted);
}

.row-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  transition: border-bottom 0.2s;
  border-bottom: 1px solid transparent;
}

.row-link:hover {
  border-bottom-color: var(--accent);
}

/* ── Module 03: Skills Ledger Layout ──────────────────────── */
.skills-ledger {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.ledger-block {
  display: flex;
  flex-direction: column;
}

.ledger-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: #ffffff;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.ledger-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ledger-list li {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.45;
}

.tech-strong {
  color: var(--fg);
  font-weight: 500;
}

.ledger-list li span.tech-strong::after {
  content: '';
  display: inline-block;
  width: 3px; height: 3px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: middle;
}

/* ── Module 04: Credentials Table ────────────────────────── */
.certifications-table {
  border: 1px solid var(--border);
  background: rgba(17,18,21,0.2);
}

.cert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s;
}

.cert-item:last-child {
  border-bottom: none;
}

.cert-item:hover {
  background: var(--bg-hover);
}

.cert-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.cert-title:hover {
  color: var(--accent);
}

.cert-school {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--fg-muted);
  margin-top: 1px;
}

.cert-level {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--fg-dark);
  font-weight: 500;
}

.cert-item:hover .cert-level {
  color: var(--fg-muted);
}

/* ── Module 05: Contact Section ────────────────────────────── */
.section-dark {
  background: #060708;
}

.contact-card {
  max-width: 680px;
}

.contact-headline {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 0;
  color: #ffffff;
  margin: 12px 0;
}

.contact-narrative {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-muted);
  margin-bottom: 28px;
}

.email-block {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.email-label {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--fg-dark);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.email-anchor {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--fg);
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  transition: color 0.2s;
  display: inline-block;
}

.email-anchor:hover {
  color: var(--accent);
}

.email-hint {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--fg-dark);
  margin-top: 6px;
}

.contact-links {
  display: flex;
  gap: 24px;
}

.btn-flat {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.btn-flat:hover {
  color: var(--accent);
}

/* ── Footer ────────────────────────────────────────────────── */
.zine-footer {
  padding: 32px 0 0 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--fg-dark);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--fg-muted);
}

/* ── Active Scroll Reveal Mechanics ────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger indices */
.timeline-row:nth-child(2)[data-reveal],
.catalog-row:nth-child(2)[data-reveal] { transition-delay: 0.05s; }
.timeline-row:nth-child(3)[data-reveal],
.catalog-row:nth-child(3)[data-reveal] { transition-delay: 0.10s; }
.catalog-row:nth-child(4)[data-reveal] { transition-delay: 0.15s; }
.catalog-row:nth-child(5)[data-reveal] { transition-delay: 0.20s; }
.catalog-row:nth-child(6)[data-reveal] { transition-delay: 0.25s; }

/* ── Mobile and Tablet Adaptations ─────────────────────────── */
@media (max-width: 800px) {
  .zine-hero {
    padding: calc(var(--nav-h) + 40px) 0 50px;
  }

  .hero-headline {
    font-size: 34px;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .catalog-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .skills-ledger {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }

  .hero-headline {
    font-size: 30px;
  }

  .contact-headline {
    font-size: 28px;
  }

  .email-anchor {
    font-size: 24px;
    overflow-wrap: anywhere;
  }

  .nav-links {
    display: none;
  }

  .contact-links {
    flex-direction: column;
    gap: 12px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
