/*!
 * Copyright (c) 2026 Jaydev Gusani. All rights reserved.
 * This source code is proprietary. Unauthorized copying, 
 * distribution, or modification is strictly prohibited.
 */
 
 @font-face {
  font-family: 'Inter var';
  src: url('/assets/fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/assets/fonts/cormorant-garamond-v21-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Baskerville';
  src: url('/assets/fonts/libre-baskerville-v24-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* =========================================================
   Design tokens
   ========================================================= */

:root {
  --bg-page: #e6dacc;
  --border-subtle: rgba(31, 33, 36, 0.04);
  --text-primary: #0a1220;
  --text-secondary: #33302e;
  --phi: 1.618;
  --accent: #E65427;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --motion-fast: 150ms;
  --space-xs: 12px;
  --space-sm: 24px;
  --space-md: 48px;
  --space-lg: 96px;
}

/* =========================================================
   Dark mode tokens
   ========================================================= */

[data-theme="dark"] {
  --bg-page: #0A1220;
  --text-primary: #e6dacc;
  --text-secondary: #d4cec6;
  --border-subtle: rgba(241, 245, 249, 0.06);
}
[data-theme="dark"] .nav-inner {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   Base reset
   ========================================================= */

* {
  box-sizing: border-box;
}

/* Optimized Body: Hardware Acceleration + Aesthetic Lock */
body {
  margin: 0;
  font-family: 'Inter var', system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: var(--phi);
  
  /* The Inter-Söhne Lock */
  /* cv01 = single-story 'a', cv11 = single-story 'u', ss01 = OpenType Set 1 */
  /* Optimized Inter-Söhne Lock v2 */
  /* cv01: single-story a | cv11: single-story u | cv05: slashed l (legibility) */
  /* cv08: upper-case '0' | ss01: open G/R/M | kern/case: alignment */
  font-feature-settings: "cv01", "cv02", "cv05", "cv08", "cv11", "ss01", "case", "kern";
  
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;

  /* Reveal Logic */
  opacity: 0;
  transition: opacity var(--motion-fast) var(--ease-standard);
}
body.loaded {
  opacity: 1;
  font-optical-sizing: auto;
}
[data-theme="light"] body::before {
  color: #0A1220;
  opacity: 0.016;
}

[data-theme="dark"] body::before {
  color: #e6dacc;
  opacity: 0.026;
}
body::before {
  content: "";

  position: fixed;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  width: min(420px, 40vw);
  height: min(420px, 40vw);

  background-color: currentColor;

  -webkit-mask-image: url("/assets/rose.svg");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;

  mask-image: url("/assets/rose.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;


  pointer-events: none;
  z-index: -1;


}

/* =========================================================
   Page layout
   ========================================================= */

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-lg) 24px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* =========================================================
   Module base
   ========================================================= */

.module {
  display: block;
  max-width: 100%;
}

/* =========================================================
   Hero
   ========================================================= */

.hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.3rem;
  letter-spacing: 0.6em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.hero .eyebrow {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  font-weight: 300;
  margin-bottom: var(--space-sm);
}

.hero-lead {
  font-weight: 300;
  font-size: 1.35rem;
  letter-spacing: -0.015em; 
  line-height: 1.25; 
  max-width: calc(560px / var(--phi) * 1.5);
  margin-bottom: var(--space-xs);
  
  /* Text-wrap: balance is expensive; limit it to hero to protect TBT */
  text-wrap: balance; 
  
  /* Ensure the thin weight renders sharply */
  transform: translateZ(0); 
}

.hero-subline {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
}

.hero {
  margin-bottom: calc(var(--space-lg) * -0.4);
}

/* =========================================================
   Text block
   ========================================================= */

.text-block {
  max-width: 640px;
}
.text-block p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.text-block p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: var(--phi);
}

/* =========================================================
   Grid / cards
   ========================================================= */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-sm);
}

.card {
  background: transparent;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-sm);
  display: flex;
  flex-direction: column;
}

.card-media {
  aspect-ratio: 16 / 10;
  background: var(--border-subtle); /* Link this to tokens for Dark Mode auto-sync */
}

.card-body {
  padding-top: var(--space-sm);
}

.card h3 {
  margin: 0 0 var(--space-xs);
  font-family: 'Libre Baskerville', serif;
}

/* =========================================================
   Image strip
   ========================================================= */

.image-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-xs);
}

.image-placeholder {
  aspect-ratio: 1 / 1;
  background: #EDEBE6;
  background: var(--border-subtle); /* Link this to tokens for Dark Mode auto-sync */
}

/*==========================================================
Divider
============================================================*/
hr {
    border: 0;
    border-top: 1px solid var(--text-primary);
    margin: 1px 0;
    opacity: 0.5;
}

/* =========================================================
  Projects 
  ========================================================== */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md) 0;
  padding-top: var(--space-md);
  padding-block: var(--space-md);
}

/* Card */
.project {
  width: 100%;
  max-width: 960px; /* tighter than before */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* Text block */
.project-body {
  padding: var(--space-xs) var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 2px; /* tight hierarchy like your sketch */
}

/* Project name (serif) */
.project-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.2;
  font-weight: 500;
}

/* Project details (Inter) */
.project-meta {
  font-family: 'Inter var', system-ui, sans-serif;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.3;
}
.project-actions {
  display: flex;
  gap: 12px;
}
.project-actions a {
  text-decoration: none;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.project-actions a:hover {
  opacity: 1;
}

/* =========================================================
   Archive / notes
   ========================================================= */

.archive {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.archive-item {
  background: transparent;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-sm);
}

.archive-item h4 {
  margin: 0 0 var(--space-xs);
  font-family: 'Libre Baskerville', serif;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  font-size: 0.85rem;
  color: var(--text-secondary);
}


/* =========================================================
   Navbar (flat, minimal)
   ========================================================= */

.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 100;
  transition:
    opacity 150ms var(--ease-standard),
    transform 150ms var(--ease-standard);
}
.nav.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.nav-inner {
  display: flex;
  align-items: center;
  padding: 8px 18px;
  gap: var(--space-sm);
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.nav-name {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-secondary);
  border-bottom: 1px solid transparent;
  /* Staggered transition: color is fast, border-color is slow */
  transition: 
  color 150ms var(--ease-standard),
  border-color 400ms var(--ease-standard);
}

.nav-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.theme-toggle {
  display: none; /* Controlled by .nav.show-theme-toggle */
  margin: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-page);
  color: var(--text-secondary);
  cursor: pointer;
  overflow: hidden;

  transition: 
    color var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    background-color 400ms var(--ease-standard),
    transform 500ms var(--ease-standard);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav.show-theme-toggle .theme-toggle {
  display: inline-flex;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.theme-toggle:active {
  transform: scale(0.92);
}

/* =========================================================
   Resume page (document layout)
   ========================================================= */

.resume {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-lg) 24px;
  font-size: 0.95rem;
}

.resume-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-md);
}

.resume-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.resume-header .subtitle {
  color: var(--text-secondary);
}

.resume-section {
  margin-bottom: var(--space-md);
}

.resume-section h2 {
  font-family: 'Libre Baskerville', serif;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

.resume-item {
  margin-bottom: var(--space-sm);
}

.resume-item header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.resume-item ul {
  margin: 0;
  padding-left: 18px;
}

.resume-item li {
  margin-bottom: 4px;
}
/* =========================================================
   Resume Abstract (Unified)
   ========================================================= */

.resume-abstract {
  margin: var(--space-sm); /* Unified top/bottom margin */
  max-width: 640px;
  border-left: 1px solid var(--border-subtle);
  padding-left: var(--space-xs);
  margin-bottom: var(--space-md);
}

.resume-abstract-label {
  font-family: 'Cormorant Garamond', serif;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.9rem;
  color: var(--text-secondary); 
  display: block;
  margin-bottom: 8px;
  font-variant-caps: all-small-caps;
}

.resume-abstract p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.resume-abstract p strong {
  color: var(--text-primary);
  font-weight: 600;
}
/* =========================================================
   Resume CTA Highlight (Clarity Optimization)
   ========================================================= */

.nav-links a.nav-resume {
  color: var(--accent);
  font-weight: 500; /* Subtle weight increase for optical dominance */
  border-bottom: 1.5px solid var(--accent); /* Permanent signal */
  padding-bottom: 2px;
  /* Maintain speed, but highlight the interaction */
  transition: opacity var(--motion-fast) var(--ease-standard);
}

.nav-links a.nav-resume:hover {
  opacity: 0.7; /* Instead of changing color, change 'density' */
  border-bottom-width: 2.5px; /* Physical feedback on hover */
}

/* =========================================================
   Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  /* 1. Kill the UI noise */
  .nav, .theme-toggle, .footer, .download-btn {
    display: none !important;
  }

  /* 2. Reset the canvas */
  body {
    background: white !important;
    color: black !important;
    opacity: 1 !important; /* Ensure visibility */
    font-size: 11pt;
  }

  .page {
    padding: 0;
    margin: 0;
    max-width: 100%;
  }

  /* 3. High-fidelity typography */
  .entry-title {
    font-size: 24pt;
    border-bottom: 0.5pt solid #000;
  }

  /* 4. Infrastructure: No orphan lines at bottom of pages */
  p {
    orphans: 3;
    widows: 3;
  }
}