/* ==========================================================================
   ALISURU.DEV — DESIGN SYSTEM & STYLES
   1:1 Reference Styling matching modern aesthetic, fluid clamp typography,
   sticky stacking cards, glassmorphic dock, and smooth micro-interactions.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & THEME TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Fonts */
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout & Widths */
  --gutter: 24px;
  --content: 1048px;
  --max-width-wide: 1300px;

  /* Dark Theme Tokens (Default) */
  --bg: #17191c;
  --panel: #212225;
  --card-bg: #1e2024;
  --fg: #ffffff;
  --secondary: #a0a6b2;
  --accent: #3bf;
  --warm: #d98e73;

  --border: rgba(255, 255, 255, 0.16);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-faint: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.65);
  
  --bg-overlay: rgba(255, 255, 255, 0.04);
  --glass-bg: rgba(23, 25, 28, 0.85);
  --radial-shadow: rgba(0, 0, 0, 0.8);
  --shadow-color: rgba(0, 0, 0, 0.4);

  --pill-bg: rgba(255, 255, 255, 0.08);
  --pill-border: rgba(255, 255, 255, 0.15);
  --pill-fg: #ffffff;
  --pill-solid-bg: #f0f0f2;
  --pill-solid-fg: #0c0c0e;

  --gradient-stop-1: rgba(255, 255, 255, 0.04);
  --gradient-stop-2: rgba(0, 0, 0, 0.2);

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Light Theme Tokens */
[data-theme="light"] {
  --bg: #f9fafb;
  --panel: #ffffff;
  --card-bg: #ffffff;
  --fg: #111827;
  --secondary: #4b5563;
  --accent: #2563eb;
  --warm: #d97706;

  --border: rgba(0, 0, 0, 0.14);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-faint: rgba(0, 0, 0, 0.04);
  --border-hover: rgba(0, 0, 0, 0.5);

  --bg-overlay: #ffffff;
  --glass-bg: rgba(249, 250, 251, 0.92);
  --radial-shadow: rgba(0, 0, 0, 0.04);
  --shadow-color: rgba(0, 0, 0, 0.08);

  --pill-bg: #ffffff;
  --pill-border: rgba(0, 0, 0, 0.12);
  --pill-fg: #111827;
  --pill-solid-bg: #111827;
  --pill-solid-fg: #ffffff;

  --gradient-stop-1: rgba(0, 0, 0, 0.03);
  --gradient-stop-2: rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: radial-gradient(circle at 50% 18%, var(--radial-shadow), transparent 30rem), var(--bg);
  min-width: 320px;
  min-height: 100vh;
  color: var(--fg);
  overflow-x: clip;
  line-height: 1.5;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

img, svg {
  display: block;
  max-width: 100%;
}

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

button, input, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

::selection {
  color: #ffffff;
  background: #3b82f6;
}

/* Skip link for accessibility */
.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 999;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------------------
   3. SITE HEADER & DYNAMIC LOGO
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: 96px;
  padding: 24px var(--gutter) 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  pointer-events: none;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 160px;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--glass-bg) 35%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

/* Logo with Hover Expand Animation */
.site-logo {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  line-height: 31px;
  letter-spacing: 0.04em;
  color: var(--fg);
  display: inline-block;
  white-space: nowrap;
  justify-self: start;
  user-select: none;
}

.site-logo__dot {
  display: inline-block;
  transition: opacity 0.32s cubic-bezier(0.65, 0, 0.35, 1), transform 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}

.site-logo__grow {
  display: inline-grid;
  grid-template-columns: 0fr;
  transition: grid-template-columns 0.32s cubic-bezier(0.65, 0, 0.35, 1);
  vertical-align: baseline;
  transition-delay: 0.12s;
}

.site-logo__grow > span {
  min-width: 0;
  overflow: hidden;
}

.site-logo:hover .site-logo__grow,
.site-logo:focus-visible .site-logo__grow {
  grid-template-columns: 1fr;
  transition-delay: 0s;
}

.site-logo:hover .site-logo__dot,
.site-logo:focus-visible .site-logo__dot {
  opacity: 0;
  transform: translate(0.5em);
}

/* Nav Links */
.site-nav {
  display: none;
  justify-self: center;
  align-items: center;
  gap: 16px;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
  padding: 12px 16px;
  border-radius: 999px;
  transition: color 0.12s linear;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--fg);
}

/* Header Action Buttons */
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-resume {
  height: 48px;
  min-height: 48px;
  padding-inline: 20px;
  font-size: 14px;
}

.header-cta {
  justify-self: end;
  min-width: 124px;
  height: 48px;
  padding-inline: 16px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   4. PILL BUTTON STYLES & RAINBOW SHIMMER
   -------------------------------------------------------------------------- */
.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  min-height: 64px;
  padding: 0 32px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  box-shadow: inset 0 0 20px var(--shadow-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--fg);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.22s, background-color 0.22s, color 0.22s, box-shadow 0.22s;
}

.pill-button > * {
  position: relative;
  z-index: 2;
}

.pill-button:hover,
.pill-button:focus-visible {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

/* Solid Button with Rainbow Sweep Shimmer */
.pill-button--solid {
  background: var(--pill-solid-bg);
  color: var(--pill-solid-fg);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14), inset 0 1px 0 var(--border-hover);
}

.pill-button--solid::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    108deg,
    #ff5f87 0%,
    #ff9a3c 14%,
    #ffe93c 28%,
    #3cffc3 42%,
    #3cb8ff 56%,
    #9b5cff 70%,
    #ff5cf4 84%,
    #ff5f87 100%
  ) 100% 0 / 300% 100%;
  opacity: 0;
  transition: opacity 0.35s, background-position 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
  pointer-events: none;
}

.pill-button--solid:hover::before,
.pill-button--solid:focus-visible::before {
  opacity: 0.32;
  background-position: 0 0;
}

.pill-button--solid:active::before {
  opacity: 0.18;
}

.pill-button--solid::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -80%;
  width: 55%;
  height: 140%;
  background: linear-gradient(to right, transparent 0%, var(--gradient-stop-2) 45%, var(--border-hover) 50%, var(--gradient-stop-2) 55%, transparent 100%);
  transform: skew(-18deg);
  opacity: 0;
  border-radius: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.1s;
}

.pill-button--solid:hover::after,
.pill-button--solid:focus-visible::after {
  animation: pill-shine-sweep 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes pill-shine-sweep {
  0% { opacity: 0.9; left: -80%; }
  80% { opacity: 0.6; }
  100% { opacity: 0; left: 130%; }
}

.pill-button--solid:hover,
.pill-button--solid:focus-visible {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22), inset 0 1px 0 var(--border-hover);
  transform: translateY(-3px);
}

.pill-button--solid:active {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18), inset 0 1px 0 var(--border-hover);
  transform: translateY(-1px);
}

/* Variant Project Buttons */
.pill-button--lime {
  background: #dbf342;
  color: #000;
  border-color: #dbf342;
}
.pill-button--lime:hover,
.pill-button--lime:focus-visible {
  background: #c7e127;
  box-shadow: 0 0 20px rgba(219, 243, 66, 0.4);
}

.pill-button--emerald {
  background: #00d26a;
  color: #000;
  border-color: #00d26a;
}
.pill-button--emerald:hover,
.pill-button--emerald:focus-visible {
  background: #00b95d;
  box-shadow: 0 0 20px rgba(0, 210, 106, 0.4);
}

.pill-button--purple {
  background: #a855f7;
  color: var(--fg);
  border-color: #a855f7;
}
.pill-button--purple:hover,
.pill-button--purple:focus-visible {
  background: #9333ea;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
}

.pill-button--cyan {
  background: #38bdf8;
  color: #000;
  border-color: #38bdf8;
}
.pill-button--cyan:hover,
.pill-button--cyan:focus-visible {
  background: #0ea5e9;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

/* --------------------------------------------------------------------------
   5. HERO SECTION — EXACT 1:1 REFERENCE
   -------------------------------------------------------------------------- */
.screens {
  overflow-x: clip;
}

.screen {
  padding: 64px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.hero-section {
  min-height: 85svh;
  padding-block: var(--gutter);
  justify-content: center;
}

.hero-headline {
  width: min(720px, 100vw - 48px);
  min-height: 280px;
  color: var(--fg);
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  display: flex;
  position: relative;
}

.hero-meta {
  color: var(--secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.65vw, 24px);
  font-weight: 500;
  line-height: 1;
}

.hero-line, .hero-role {
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-size: clamp(30px, 5vw, 72px);
  line-height: 1.05;
  display: block;
}

.hero-line {
  margin-top: clamp(10px, 1vw, 18px);
  font-weight: 500;
}

.hero-role {
  margin-bottom: clamp(16px, 2vw, 28px);
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.hero-role--blue {
  color: var(--fg);
}

.hero-role--orange {
  color: var(--warm);
}

.hero-caret {
  background: var(--accent);
  vertical-align: -0.08em;
  width: clamp(2px, 0.35vw, 6px);
  height: 0.9em;
  margin-left: 4px;
  animation: 0.9s steps(2, end) infinite caret-blink;
  display: inline-block;
}

@keyframes caret-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* Simulated Modern Sleek Mouse Cursor in Hero */
.hero-cursor {
  pointer-events: none;
  z-index: 15;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='26' viewBox='0 0 22 26' fill='none'%3E%3Cg filter='drop-shadow(0px 2px 4px rgba(0,0,0,0.45))'%3E%3Cpath d='M3 2v18.5l4.8-4.3 3 6.8 2.6-1.1-3-6.9 6.2-.2L3 2z' fill='%23000000'/%3E%3Cpath d='M4.5 4.8v13.4l3.5-3.1 3 6.8 1.1-.5-3-6.9 4.8-.1L4.5 4.8z' fill='%23ffffff'/%3E%3C/g%3E%3C/svg%3E") 0 0 / contain no-repeat;
  width: 20px;
  height: 24px;
  position: absolute;
  transform: translate(-1px, -2px);
}

/* Simulated Text Highlight Selection in Hero */
.hero-selection {
  pointer-events: none;
  z-index: 5;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.32);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
  position: absolute;
}

/* Scroll Hint Arrow */
.scroll-hint {
  width: 96px;
  height: 128px;
  color: var(--secondary);
  justify-content: center;
  align-items: flex-end;
  display: flex;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%);
}

.scroll-hint svg {
  width: 24px;
  height: 32px;
  margin-bottom: 24px;
  transition: transform 0.6s ease-out, color 0.6s ease-out;
  animation: 1.8s ease-in-out infinite arrow-bob;
}

.scroll-hint:hover svg {
  color: var(--fg);
  transform: translateY(24px) scale(1.35);
}

@keyframes arrow-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* Divider Line */
.section-divider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px var(--gutter, 24px);
}

.section-divider__line {
  width: 100%;
  max-width: var(--content);
  height: 1px;
  background: linear-gradient(to right, transparent 0%, var(--border-subtle) 20%, var(--border) 50%, var(--border-subtle) 80%, transparent 100%);
}

/* --------------------------------------------------------------------------
   6. ABOUT SECTION
   -------------------------------------------------------------------------- */
.about-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  width: 100%;
  max-width: var(--content);
}

.about-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.about-copy h2 {
  color: var(--fg);
  letter-spacing: -0.04em;
  margin: 0;
  font-size: clamp(64px, 8vw, 128px);
  font-weight: 600;
  line-height: 1;
}

.about-copy p {
  color: var(--secondary);
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

.about-copy strong {
  color: var(--fg);
  font-weight: 600;
}

.about-cta {
  margin-top: 8px;
}

.about-photo-wrap {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.photo-card {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 20px 50px var(--shadow-color);
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-bounce), box-shadow var(--transition-fast);
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px var(--shadow-color);
}

.photo-card img {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   7. EXPERIENCE & TIMELINE
   -------------------------------------------------------------------------- */
.screen-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
}

.section-heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--fg);
}

.timeline-container {
  position: relative;
}

.timeline-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border-subtle) 10%, var(--border-subtle) 90%, transparent);
  transform: translateX(-50%);
  z-index: 1;
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: start;
}

.timeline-slot-left {
  padding: 0 2rem 0 0;
  display: flex;
  justify-content: flex-end;
}

.timeline-slot-right {
  padding: 0 0 0 2rem;
}

.timeline-dot-wrapper {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
  z-index: 2;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 12px var(--shadow-color);
  flex-shrink: 0;
}

/* Reveal Cards */
.reveal-card {
  padding: 2rem;
  border-radius: 24px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  z-index: 2;
  transition: border-color 0.3s, background 0.3s, opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-from-left {
  opacity: 0;
  transform: translateX(-48px);
}

.reveal-from-right {
  opacity: 0;
  transform: translateX(48px);
}

.reveal-visible {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
}

.timeline-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-date {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.4rem;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 0.2rem;
  letter-spacing: -0.02em;
}

.timeline-company {
  font-size: 0.9rem;
  color: var(--secondary);
  margin: 0;
  font-weight: 400;
}

.timeline-list {
  color: var(--fg);
  padding-left: 1.1rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.875rem;
  list-style: disc;
}

/* --------------------------------------------------------------------------
   8. SKILLS SECTION
   -------------------------------------------------------------------------- */
.skills-block {
  margin-top: 6rem;
}

.skills-container {
  padding: 2rem;
  border-radius: 20px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-overlay);
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

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

[data-theme="light"] .theme-invert {
  filter: invert(1);
}

/* --------------------------------------------------------------------------
   9. PROJECTS SECTION (OPTIMIZED BALANCED SCALE)
   -------------------------------------------------------------------------- */
.projects-section {
  position: relative;
  width: 100%;
  padding: 100px 24px 64px;
}

.projects-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
  padding-inline: 12px;
}

.projects-header__left {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.projects-heading {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg);
  line-height: 1;
}

.projects-stack {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

.project-sticky-wrapper {
  position: sticky;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

/* Scaled Card Element */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1140px;
  border-radius: 28px;
  border: 1.5px solid #000000;
  background-color: var(--panel) !important;
  box-shadow: 0 20px 45px -10px var(--shadow-color);
  overflow: hidden;
  margin-bottom: 72px;
  margin-inline: auto;
  transform-origin: top center;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
  .project-card {
    flex-direction: row;
  }
}

[data-theme="light"] .project-card {
  background-color: #ffffff !important;
  border: 1.5px solid #000000 !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="dark"] .project-card {
  border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
}

/* Left Column (40%) */
.project-card__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 24px;
  z-index: 10;
}

@media (min-width: 768px) {
  .project-card__info {
    width: 42%;
    padding: 36px 40px;
  }
}

.project-title {
  font-size: clamp(1.6rem, 2.2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 12px;
  display: block;
}

.project-title--lime {
  background: linear-gradient(110deg, var(--fg) 0%, #dbf342 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-title--emerald {
  background: linear-gradient(110deg, var(--fg) 0%, #00d26a 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-title--purple {
  background: linear-gradient(110deg, var(--fg) 0%, #a855f7 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-title--cyan {
  background: linear-gradient(110deg, var(--fg) 0%, #38bdf8 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-title--amber {
  background: linear-gradient(110deg, var(--fg) 0%, #f59e0b 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-description {
  color: var(--secondary);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 20px;
  text-wrap: balance;
}

.project-role-block {
  margin-bottom: 20px;
  display: none;
}

@media (min-width: 768px) {
  .project-role-block {
    display: block;
  }
}

.project-role-heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--secondary);
  margin-bottom: 6px;
}

.project-role-text {
  font-size: 0.825rem;
  color: var(--fg);
  line-height: 1.5;
  opacity: 0.9;
  text-wrap: balance;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-faint);
  background: var(--bg-overlay);
  color: var(--secondary);
  letter-spacing: 0.025em;
}

/* Right Column (58% with bg-bg/50) */
.project-card__media {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  background: rgba(23, 25, 28, 0.5);
  border-radius: 0 0 28px 28px;
}

@media (min-width: 768px) {
  .project-card__media {
    width: 58%;
    padding: 28px;
    border-radius: 0 28px 28px 0;
  }
}

[data-theme="light"] .project-card__media {
  background: rgba(0, 0, 0, 0.03);
}

.media-frame {
  width: 100%;
  aspect-ratio: 16 / 10;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  outline: 1px solid rgba(0, 0, 0, 0.08);
}

.media-frame img {
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* --------------------------------------------------------------------------
   10. FLOATING BOTTOM DOCK / FOOTER
   -------------------------------------------------------------------------- */
.floating-dock-wrapper {
  position: fixed;
  bottom: 32px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

.site-footer {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: fit-content;
}

.site-footer a,
.site-footer button {
  opacity: 0.7;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: var(--pill-fg);
  transition: opacity 0.18s, transform 0.18s, color 0.2s;
  position: relative;
  z-index: 2;
}

@media (hover: hover) {
  .site-footer a:hover,
  .site-footer button:hover {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* Theme Toggle Icons */
[data-theme="dark"] .icon-moon {
  display: none;
}
[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="light"] .icon-sun {
  display: none;
}
[data-theme="light"] .icon-moon {
  display: block;
}

/* --------------------------------------------------------------------------
   11. CONTACT MODAL (PERFECT VERTICAL CENTERING & BALANCED TYPOGRAPHY)
   -------------------------------------------------------------------------- */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 9, 11, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  transition: opacity 0.22s ease;
}

.contact-modal.is-active {
  opacity: 1;
  pointer-events: auto;
}

.contact-dialog {
  border: 1px solid var(--border-subtle);
  background: var(--panel);
  width: min(580px, 100%);
  max-height: min(92vh, 680px);
  overflow-y: auto;
  box-shadow: 0 40px 120px var(--shadow-color);
  border-radius: 32px;
  padding: clamp(28px, 4vw, 44px);
  position: relative;
  margin: auto;
  transform: scale(0.95);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] .contact-dialog {
  background: #ffffff;
}

.contact-modal.is-active .contact-dialog {
  transform: scale(1);
}

.contact-close {
  border: 1px solid var(--border-subtle);
  width: 40px;
  height: 40px;
  color: var(--fg);
  cursor: pointer;
  background: var(--bg-overlay);
  border-radius: 50%;
  place-items: center;
  padding: 0;
  display: grid;
  position: absolute;
  top: 20px;
  right: 20px;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
  z-index: 10;
}

@media (hover: hover) {
  .contact-close:hover {
    border-color: var(--border-hover);
    transform: rotate(90deg);
  }
}

.contact-close svg {
  width: 20px;
}

.contact-form,
.contact-success {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form h2 {
  margin: 0 0 10px;
  padding-right: 48px;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--fg);
  max-width: 100%;
}

.contact-form label {
  color: var(--secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: flex;
}

.contact-form input,
.contact-form textarea {
  border: 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  color: var(--fg);
  text-transform: none;
  background: 0 0;
  outline: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  transition: border-color var(--transition-fast);
}

.contact-form input {
  height: 42px;
}

.contact-form textarea {
  resize: vertical;
  min-height: 76px;
  padding-top: 8px;
}

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

.contact-form button[type="submit"] {
  align-self: flex-start;
  width: fit-content;
  min-height: 50px;
  height: 50px;
  padding: 0 32px;
  font-size: 14px;
  margin-top: 10px;
}

.contact-success h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.contact-success span {
  color: var(--accent);
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.contact-success button {
  align-self: flex-start;
  width: fit-content;
  min-height: 48px;
  margin-top: 12px;
  padding: 0 32px;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  :root {
    --gutter: 64px;
  }
  .site-header {
    grid-template-columns: 1fr auto 1fr;
    padding-top: 32px;
  }
  .site-nav {
    display: flex;
  }
  .header-resume {
    min-height: 56px;
    padding-inline: 24px;
  }
  .header-cta {
    min-width: 188px;
    height: 56px;
    padding-inline: 28px;
    font-size: 20px;
  }
  .screen {
    padding: 128px var(--gutter);
  }
  .hero-section {
    min-height: 85vh;
    padding-block: var(--gutter);
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 20px;
  }
  .site-header {
    height: 72px;
    padding: 16px var(--gutter) 0;
    grid-template-columns: auto 1fr auto;
  }
  .site-logo {
    font-size: 18px;
  }
  .header-resume {
    height: 40px;
    min-height: 40px;
    padding-inline: 12px;
    font-size: 12px;
  }
  .header-cta {
    min-width: 100px;
    height: 40px;
    padding-inline: 12px;
    font-size: 12px;
  }
  .screen {
    padding: 80px var(--gutter) 48px;
  }
  .hero-section {
    justify-content: center;
    min-height: 85svh;
    padding-block: var(--gutter);
  }
  .hero-headline {
    width: 100%;
    min-height: 220px;
    gap: 0;
  }
  .hero-meta {
    font-size: clamp(13px, 3.6vw, 16px);
    letter-spacing: 0.04em;
  }
  .hero-line,
  .hero-role {
    font-size: clamp(28px, 7.8vw, 44px);
    white-space: nowrap !important;
    word-break: normal !important;
    line-height: 1.1;
  }
  .hero-line {
    margin-top: 8px;
    font-weight: 500;
  }
  .hero-role {
    margin-bottom: 16px;
    font-weight: 600;
    position: relative;
    display: inline-block;
  }
  .hero-cursor {
    top: 0;
    left: 0;
    transform: none;
  }
  .hero-selection {
    top: 0;
    left: 0;
  }
  .pill-button {
    min-height: 52px;
    padding: 0 20px;
    font-size: 13px;
  }
  .about-inner {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }
  .about-photo-wrap {
    order: -1;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
  }
  .photo-card {
    width: 225px !important;
    height: 225px !important;
    max-width: 225px !important;
    max-height: 225px !important;
    border-radius: 30px !important;
    overflow: hidden !important;
    box-shadow: 0 18px 50px var(--shadow-color) !important;
    border: 1px solid var(--border-subtle) !important;
  }
  .photo-card img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 30px !important;
    object-fit: cover !important;
    display: block !important;
  }
  .about-copy {
    align-items: center;
    width: 100%;
  }
  .about-copy h2 {
    font-size: clamp(32px, 8vw, 42px) !important;
    letter-spacing: -0.03em !important;
    margin: 12px 0 16px !important;
    text-align: center;
  }
  .about-copy p {
    font-size: 15.5px !important;
    line-height: 1.65 !important;
    text-align: left;
    max-width: 100%;
    color: var(--secondary);
  }
  .timeline-spine {
    left: 20px;
    transform: none;
  }
  .timeline-row {
    grid-template-columns: 40px 1fr;
    gap: 0.5rem;
  }
  .timeline-dot-wrapper {
    grid-column: 1;
    grid-row: 1;
  }
  .timeline-slot-left,
  .timeline-slot-right {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    justify-content: flex-start;
    display: block !important;
  }
  .reveal-from-left,
  .reveal-from-right {
    transform: translateY(24px);
  }
  .skills-container {
    padding: 1rem !important;
  }
  .projects-section {
    padding: 80px 16px 80px !important;
  }
  .projects-stack {
    padding-bottom: 120px !important;
  }
  .project-sticky-wrapper {
    position: sticky !important;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
  }
  .project-card {
    flex-direction: column !important;
    width: 100%;
    margin-bottom: 48px !important;
    border-radius: 24px !important;
    gap: 0;
  }
  .project-card__info {
    width: 100% !important;
    padding: 22px 18px 16px !important;
  }
  .project-card__media {
    width: 100% !important;
    padding: 14px !important;
    border-radius: 0 0 24px 24px !important;
  }
  .floating-dock-wrapper {
    bottom: 20px;
  }
  .site-footer {
    gap: 16px;
  }
  .site-footer a,
  .site-footer button {
    opacity: 0.85;
    transform: none !important;
    transition: color 0.15s ease, opacity 0.15s ease !important;
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
  }
  .site-footer a:hover,
  .site-footer button:hover,
  .site-footer a:active,
  .site-footer button:active,
  .site-footer a:focus,
  .site-footer button:focus {
    transform: none !important;
    opacity: 1 !important;
  }
  .contact-modal {
    padding: 16px;
  }
  .contact-dialog {
    padding: 26px 20px 22px !important;
    border-radius: 28px !important;
  }
  .contact-close,
  .contact-close:hover,
  .contact-close:active,
  .contact-close:focus {
    width: 36px !important;
    height: 36px !important;
    top: 18px !important;
    right: 18px !important;
    transform: none !important;
    transition: border-color 0.15s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
  }
  .contact-close svg {
    width: 18px !important;
    height: 18px !important;
  }
  .contact-form h2 {
    font-size: clamp(20px, 5.5vw, 24px) !important;
    line-height: 1.25 !important;
    padding-right: 44px !important;
    margin-bottom: 8px !important;
  }
}
