/* ============================================================
   BHARATH Y P — Portfolio Design System
   Academic Editorial Brutalist Aesthetic
   Monochrome · Multi-page · Vanilla CSS
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Dark theme (default) */
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --surface: #181818;
  --surface-hover: #1e1e1e;
  --border: #252525;
  --border-light: #1a1a1a;
  --text: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #ffffff;
  --accent-dim: #cccccc;
  --overlay: rgba(0, 0, 0, 0.6);

  /* Typography scale (clamp for fluid sizing) */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.8rem);
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);
  --text-base: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  --text-lg: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  --text-xl: clamp(1.3rem, 1.1rem + 1vw, 1.8rem);
  --text-2xl: clamp(1.8rem, 1.4rem + 2vw, 2.8rem);
  --text-3xl: clamp(2.2rem, 1.6rem + 3vw, 4rem);
  --text-4xl: clamp(2.8rem, 2rem + 4vw, 5.5rem);

  /* Spacing */
  --space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --space-lg: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  --space-xl: clamp(2.5rem, 1.5rem + 5vw, 5rem);
  --space-2xl: clamp(4rem, 2.5rem + 7.5vw, 8rem);
  --space-3xl: clamp(6rem, 4rem + 10vw, 12rem);

  /* Layout */
  --max-width: 1200px;
  --content-width: 800px;
  --nav-height: 72px;

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 600ms;

  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* --- Light Theme --- */
[data-theme="light"] {
  --bg: #f8f8f8;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-hover: #f0f0f0;
  --border: #e0e0e0;
  --border-light: #eeeeee;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --accent: #000000;
  --accent-dim: #333333;
  --overlay: rgba(255, 255, 255, 0.6);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--accent);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--accent);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }

p + p { margin-top: 1em; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

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

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--content-width);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: background-color var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo:hover {
  opacity: 0.8;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  position: relative;
  padding: 0.25em 0;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav__link:hover,
.nav__link--active {
  color: var(--accent);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out);
}

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

.nav__social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Theme Toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.theme-toggle:hover {
  color: var(--accent);
  background: var(--surface);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }

[data-theme="light"] .theme-toggle__sun { display: block; }
[data-theme="light"] .theme-toggle__moon { display: none; }

/* Hamburger Menu */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--accent);
  transition: transform var(--duration-normal) var(--ease-out),
              opacity var(--duration-fast) var(--ease-out);
}

.nav__hamburger.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Navigation */
@media (max-width: 900px) {
  .nav__hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 80vw);
    height: 100vh;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
    gap: var(--space-sm);
    transform: translateX(100%);
    transition: transform var(--duration-normal) var(--ease-out);
    z-index: 999;
  }

  .nav__links.open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: var(--text-base);
    padding: var(--space-sm) 0;
  }

  .nav__right {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 1000;
    transform: translateX(calc(min(320px, 80vw)));
    transition: transform var(--duration-normal) var(--ease-out);
    gap: var(--space-sm);
  }

  .nav__links.open ~ .nav__right-mobile {
    transform: translateX(0);
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-normal) var(--ease-out);
  }

  .mobile-overlay.active {
    opacity: 1;
    pointer-events: all;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) 0;
  margin-top: var(--space-3xl);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__left {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--accent);
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer__right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-spring);
}

.footer__social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer__social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn--resume-sm {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.5em 1.2em;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

.btn--resume-sm:hover {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 600px) {
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.page {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.page__header {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);
}

.page__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-sm);
}

.page__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 600px;
}

.page__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
}

/* Section spacing */
.section {
  padding: var(--space-2xl) 0;
}

.section + .section {
  border-top: 1px solid var(--border-light);
}

.section__title {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
}

.section__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
}

/* ============================================================
   HERO SECTION (Home)
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  min-height: calc(100vh - var(--nav-height));
  padding: var(--space-xl) 0;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.hero__name {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--accent);
}

.hero__title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.hero__description {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.hero__photo-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

.hero__photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius-md);
  filter: grayscale(20%);
  transition: filter var(--duration-normal) var(--ease-out);
  position: relative;
  z-index: 1;
}

.hero__photo:hover {
  filter: grayscale(0%);
}

/* Photo placeholder when no image provided yet */
.hero__photo-placeholder {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3/4;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  color: var(--border);
  font-weight: 700;
  position: relative;
}

/* Stats Row */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: var(--space-2xl) 0 var(--space-xl);
  }

  .hero__photo-wrapper {
    order: -1;
    justify-content: center;
  }

  .hero__photo,
  .hero__photo-placeholder {
    max-width: 280px;
  }

  .hero__content {
    text-align: center;
    align-items: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.9em 2em;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}

.btn--primary:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  color: var(--bg);
}

.btn--outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--outline:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  max-width: var(--content-width);
}

.about-content p {
  font-size: var(--text-lg);
  line-height: 1.9;
  color: var(--text-secondary);
}

.about-content p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin-right: 0.1em;
  margin-top: 0.05em;
  color: var(--accent);
  font-weight: 700;
}

.pullquote {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  border-left: 3px solid var(--border);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  line-height: 1.4;
}

.education-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.education-card__degree {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--accent);
}

.education-card__school {
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.education-card__meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ============================================================
   EXPERIENCE TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-2xl);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: -40px;
  top: 8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  z-index: 1;
  transition: background var(--duration-fast) var(--ease-out);
}

.timeline__item:hover .timeline__dot {
  background: var(--accent);
}

.timeline__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.timeline__company {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent);
}

.timeline__location {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.timeline__role {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-xs);
}

.timeline__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.timeline__details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.timeline__details li {
  position: relative;
  padding-left: 1.2em;
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
}

.timeline__details li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .timeline {
    padding-left: 30px;
  }

  .timeline__dot {
    left: -30px;
    width: 12px;
    height: 12px;
  }
}

/* ============================================================
   SKILLS BADGES
   ============================================================ */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.skill-category {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.skill-category__title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--border);
}

.skill-category__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.5em 1.2em;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-out);
  cursor: default;
}

.skill-badge:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ============================================================
   PROJECTS (Case Studies)
   ============================================================ */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.project-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.project-card__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-sm);
}

.project-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.project-card__meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.project-card__section-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.project-card__text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.project-card__tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 0.3em 0.8em;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.project-divider {
  text-align: center;
  padding: var(--space-lg) 0;
}

.project-divider__text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  font-style: italic;
  color: var(--text-muted);
}

/* Hackathon grid — smaller cards */
.hackathon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.hackathon-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.hackathon-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.hackathon-card__award {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.hackathon-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.hackathon-card__description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   BLOG
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: border-color var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

.blog-card:hover {
  border-color: var(--text-muted);
  transform: translateY(-3px);
}

.blog-card__type {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--accent);
  line-height: 1.3;
}

.blog-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
}

.blog-card__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.blog-card__read-more {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  transition: gap var(--duration-fast) var(--ease-out);
}

.blog-card:hover .blog-card__read-more {
  gap: 0.6em;
}

/* Blog Post / Article */
.article {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.article__header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  transition: color var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

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

.article__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-sm);
}

.article__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.article__body {
  font-size: var(--text-lg);
  line-height: 1.9;
  color: var(--text-secondary);
}

.article__body h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.article__body h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.article__body p {
  margin-bottom: var(--space-md);
}

.article__body ul,
.article__body ol {
  margin-bottom: var(--space-md);
  padding-left: 1.5em;
}

.article__body ul { list-style: disc; }
.article__body ol { list-style: decimal; }

.article__body li {
  margin-bottom: var(--space-xs);
}

.article__body blockquote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  border-left: 3px solid var(--border);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
  color: var(--accent);
}

/* Blog Post Navigation (prev/next) */
.article__nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.article__nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

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

.article__nav-link--next {
  text-align: right;
  margin-left: auto;
}

.article__nav-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article__nav-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--accent);
}

/* Series TOC */
.series-toc {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.series-toc__item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-out);
}

.series-toc__item:hover {
  border-color: var(--text-muted);
  transform: translateX(4px);
}

.series-toc__number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--border);
  min-width: 50px;
  text-align: center;
  line-height: 1;
}

.series-toc__item:hover .series-toc__number {
  color: var(--accent);
}

.series-toc__info {
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.series-toc__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--accent);
}

.series-toc__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: 0.8em 1em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color var(--duration-fast) var(--ease-out);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 160px;
  resize: vertical;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-info__item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.contact-info__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.contact-info__value {
  font-size: var(--text-base);
  color: var(--text);
}

.contact-info__value a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.contact-info__value a:hover {
  border-color: var(--accent);
}

.contact-socials {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.contact-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

.contact-social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact-social-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger > .reveal:nth-child(2) { transition-delay: 80ms; }
.stagger > .reveal:nth-child(3) { transition-delay: 160ms; }
.stagger > .reveal:nth-child(4) { transition-delay: 240ms; }
.stagger > .reveal:nth-child(5) { transition-delay: 320ms; }
.stagger > .reveal:nth-child(6) { transition-delay: 400ms; }
.stagger > .reveal:nth-child(7) { transition-delay: 480ms; }
.stagger > .reveal:nth-child(8) { transition-delay: 560ms; }
.stagger > .reveal:nth-child(9) { transition-delay: 640ms; }
.stagger > .reveal:nth-child(10) { transition-delay: 720ms; }

/* Hero stagger */
.hero-stagger > *:nth-child(1) { transition-delay: 100ms; }
.hero-stagger > *:nth-child(2) { transition-delay: 200ms; }
.hero-stagger > *:nth-child(3) { transition-delay: 300ms; }
.hero-stagger > *:nth-child(4) { transition-delay: 400ms; }
.hero-stagger > *:nth-child(5) { transition-delay: 500ms; }
.hero-stagger > *:nth-child(6) { transition-delay: 600ms; }

/* ============================================================
   UTILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-xl { margin-top: var(--space-xl); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Form */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0;
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

.form-input:focus {
  outline: none;
  border-color: var(--text);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

/* Contact Info */
.contact-info__items {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.contact-info__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.contact-info__item:hover {
  border-color: var(--text);
  background: var(--surface);
}

.contact-info__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.contact-info__icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.contact-info__text {
  display: flex;
  flex-direction: column;
}

.contact-info__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-info__value {
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

.contact-info__location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}
