/* ============================================================
   TOKENS — pastel-on-void, terminal/space aesthetic
   ============================================================ */

:root {
  /* Deep space base */
  --void: #05070f;
  --dark-1: #080c18;
  --dark-2: #0c1020;
  --dark-3: #101628;

  /* Pastel nebula accents */
  --lavender: #a89ee0; /* soft purple — primary accent */
  --lavender-dim: #6860a8; /* muted lavender */
  --mint: #78d4c8; /* cyan-mint */
  --mint-dim: #4a9e98; /* muted mint */
  --rose: #d888a0; /* soft rose */
  --rose-dim: #a05878; /* muted rose */
  --sky: #80b8e0; /* pale blue */
  --sky-dim: #4880a8; /* muted sky */
  --gold: #d8c878; /* warm pale gold */

  /* Text */
  --text: #dddaf0; /* lavender-white */
  --text-muted: #8088b8; /* muted blue-purple — boosted for AA contrast */
  --text-dim: #303858; /* very muted */
  --text-code: #a89ee0; /* lavender for mono/code text */

  /* Fonts */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "Space Mono", "Courier New", monospace;

  /* Layout */
  --max-w: 1140px;
  --pad-x: 48px;
  --pad-section: 110px;

  /* Glass panel bg for sections */
  --glass: rgba(8, 12, 24, 0.82);
  --glass-light: rgba(12, 16, 32, 0.78);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}

/* ============================================================
   MONO / TERMINAL HELPERS
   ============================================================ */

.mono-prefix {
  font-family: var(--font-mono);
  color: var(--lavender);
  font-style: normal;
}

/* ============================================================
   CANVAS — fixed, always behind everything
   ============================================================ */

#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 24px var(--pad-x);
  transition:
    background 0.5s,
    padding 0.4s;
}

.nav.scrolled {
  background: rgba(5, 7, 15, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(168, 158, 224, 0.12);
  padding-top: 16px;
  padding-bottom: 16px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-logo .mono-prefix {
  color: var(--mint);
}
.nav-logo:hover {
  color: var(--lavender);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a::before {
  content: "./";
  color: var(--text-dim);
}
.nav-links a:hover {
  color: var(--lavender);
}

/* ============================================================
   HERO — Register room observation deck looking at nebula
   ============================================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  z-index: 1;
  overflow: hidden;
}

/* -- Ghostly profile image ---------------------------------- */

/* -- Hero layout — sphere + text as a flex row, centered as a unit -- */

.hero-layout {
  display: flex;
  align-items: center;
  gap: clamp(56px, 6vw, 96px);
  max-width: var(--max-w);
  width: 100%;
  padding: 80px var(--pad-x) 0;
  margin: 0 auto;
  position: relative;
  z-index: 3;
}

/* -- Hero Content ------------------------------------------ */

.hero-content {
  position: relative;
  z-index: 3;
  flex: 1;
  min-width: 0;
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--mint);
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(56px, 8.5vw, 116px);
  font-weight: 600;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.name-first {
  display: block;
  font-weight: 400;
}
.name-last {
  display: block;
  font-weight: 600;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 80px;
  margin-bottom: 52px;
  letter-spacing: 0.04em;
}
.hero-role .mono-prefix {
  color: var(--text-dim);
}

.hero-sphere {
  flex-shrink: 0;
  width: clamp(140px, 18vw, 240px);
  height: clamp(140px, 18vw, 240px);
  border-radius: 50%;
  /* Glossy white sphere — radial highlight top-left */
  background: radial-gradient(
    circle at 36% 32%,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(230, 225, 248, 0.8) 30%,
    rgba(180, 170, 230, 0.45) 60%,
    rgba(120, 110, 200, 0.18) 85%,
    transparent 100%
  );
  box-shadow:
    0 0 40px rgba(255, 255, 255, 0.4),
    0 0 100px rgba(168, 158, 224, 0.28),
    0 0 180px rgba(168, 158, 224, 0.14);
  animation: sphereFloat 3.8s ease-in-out infinite;
  cursor: pointer;
  text-decoration: none;
  z-index: 3;
}

.hero-sphere:hover {
  box-shadow:
    0 0 50px rgba(255, 255, 255, 0.6),
    0 0 120px rgba(168, 158, 224, 0.45),
    0 0 200px rgba(168, 158, 224, 0.22);
}

@keyframes sphereFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

/* Scroll cue */
.hero-scroll-cue {
  position: absolute;
  bottom: calc(clamp(80px, 13vh, 130px) + 20px);
  right: 48px;
  z-index: 3;
}
.scroll-line {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, rgba(120, 212, 200, 0.3));
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(1);
  }
  50% {
    opacity: 0.8;
    transform: scaleY(1.12);
  }
}

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */

section,
footer {
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--pad-section) var(--pad-x);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--mint);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.section-label.small {
  font-size: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 600;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 48px;
  letter-spacing: 0.04em;
}

/* ============================================================
   ABOUT — glass panel, lavender accents
   ============================================================ */

.about {
  background: var(--glass);
}

.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 80px;
  align-items: start;
}

/* Photo */
.about-photo-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  position: sticky;
  top: 100px;
}

.photo-frame {
  width: 200px;
  height: 240px;
  background: var(--dark-3);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(168, 158, 224, 0.2);
  outline: 1px solid rgba(168, 158, 224, 0.08);
  outline-offset: 8px;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: saturate(0.85) contrast(1.05);
}

.photo-location {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.photo-location::before {
  content: "> ";
  color: var(--text-dim);
}

/* Text col */
.about-text-col .section-title {
  margin-bottom: 8px;
}

.about-body {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 58ch;
  margin-bottom: 20px;
}

.about-links {
  margin-top: 40px;
  display: flex;
  gap: 24px;
}

.text-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lavender);
  text-decoration: none;
  border: 1px solid rgba(168, 158, 224, 0.25);
  padding: 8px 16px;
  letter-spacing: 0.04em;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.text-link:hover {
  background: rgba(168, 158, 224, 0.08);
  border-color: var(--lavender);
}

/* ============================================================
   EXPERIENCE — deeper glass, star glow markers
   ============================================================ */

.experience {
  background: var(--glass-light);
}

.timeline {
  margin-bottom: 80px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 36px;
  margin-bottom: 60px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
}

.timeline-star {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 12px rgba(216, 136, 160, 0.6);
}
.timeline-star::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(216, 136, 160, 0.25);
  border-radius: 50%;
}

.timeline-line {
  flex: 1;
  width: 1px;
  margin-top: 10px;
  background: linear-gradient(
    to bottom,
    rgba(216, 136, 160, 0.35),
    transparent
  );
  min-height: 50px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--rose);
  letter-spacing: 0.04em;
}
.timeline-sep {
  color: var(--text-dim);
}
.timeline-location {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.timeline-company {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lavender-dim);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.timeline-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 62ch;
  margin-bottom: 18px;
}

.timeline-subgroup {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 1px solid rgba(168, 158, 224, 0.2);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.timeline-subrole {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}

.timeline-subrole-title {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

.timeline-subrole-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.timeline-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.timeline-stack span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mint-dim);
  border: 1px solid rgba(74, 158, 152, 0.25);
  padding: 3px 10px;
  letter-spacing: 0.04em;
}

/* Education */
.education {
  border-top: 1px solid rgba(168, 158, 224, 0.12);
  padding-top: 44px;
}
.edu-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 24px;
  margin-top: 20px;
}

.edu-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
}

.edu-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(216, 136, 160, 0.5);
}

.edu-dot-line {
  flex: 1;
  width: 1px;
  margin-top: 8px;
  background: linear-gradient(to bottom, rgba(216, 136, 160, 0.3), transparent);
  min-height: 30px;
}

.edu-degree {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
}

.edu-school {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}


.edu-category {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  opacity: 0.75;
  margin-bottom: 6px;
}

.edu-course {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  opacity: 0.75;
  margin-bottom: 6px;
}

.edu-detail {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  opacity: 0.6;
  margin-top: 4px;
}

/* ============================================================
   PROJECTS — dark glass, terminal-window cards
   ============================================================ */

.projects {
  background: var(--glass);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.project-card {
  background: rgba(12, 16, 32, 0.9);
  padding: 0 0 32px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  transition: background 0.3s;
  cursor: pointer;
  border: 1px solid rgba(168, 158, 224, 0.1);
}
.project-card:hover {
  background: rgba(18, 22, 44, 0.95);
  border-color: rgba(168, 158, 224, 0.25);
}

/* Terminal window title bar */
.project-terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(168, 158, 224, 0.06);
  border-bottom: 1px solid rgba(168, 158, 224, 0.1);
  margin-bottom: 0;
}
.project-terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.project-terminal-bar span:nth-child(1) {
  background: rgba(216, 136, 160, 0.6);
}
.project-terminal-bar span:nth-child(2) {
  background: rgba(216, 200, 120, 0.5);
}
.project-terminal-bar span:nth-child(3) {
  background: rgba(120, 212, 200, 0.5);
}

.project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 28px 32px 0;
}

.project-constellation-dot {
  color: var(--rose);
  font-size: 11px;
  text-shadow: 0 0 10px rgba(216, 136, 160, 0.7);
  transition: text-shadow 0.3s;
}
.project-card:hover .project-constellation-dot {
  text-shadow: 0 0 18px rgba(216, 136, 160, 1);
}

.project-lang {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--mint-dim);
  letter-spacing: 0.04em;
}
.project-lang::before {
  content: "# ";
  color: var(--text-dim);
}

.project-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  padding: 0 32px;
}

.project-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.8;
  flex: 1;
  margin-bottom: 24px;
  padding: 0 32px;
}

.project-footer {
  padding: 0 32px;
}

.project-view {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lavender);
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 0.25s,
    transform 0.3s;
  display: inline-block;
  letter-spacing: 0.04em;
}
.project-view::before {
  content: "> ";
  color: var(--text-dim);
}
.project-card:hover .project-view {
  opacity: 1;
  transform: translateX(0);
}

/* Coming soon card */
.coming-soon-card {
  border-style: dashed;
  opacity: 0.7;
  cursor: default;
}
.coming-soon-card:hover {
  transform: none;
  border-color: var(--border);
}

/* ============================================================
   SKILLS — code-style layout
   ============================================================ */

.skills {
  background: var(--glass-light);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 56px 40px;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lavender);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(168, 158, 224, 0.18);
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.skill-group-title .mono-prefix {
  color: var(--sky);
}

.skill-group ul {
  list-style: none;
}
.skill-group ul::after {
  content: "]";
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--lavender);
  padding-top: 10px;
  letter-spacing: 0.02em;
}

.skill-group li {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid rgba(221, 218, 240, 0.04);
  line-height: 1.4;
  transition: color 0.2s;
}
.skill-group li::before {
  content: "  ";
}
.skill-group li:hover {
  color: var(--text);
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact {
  background: rgba(5, 7, 14, 0.9);
  overflow: hidden;
}

.contact-room {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.contact-floor-strip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: rgba(5, 7, 15, 0.96);
  border-top: 1px solid rgba(168, 158, 224, 0.08);
}

.contact .section-inner {
  position: relative;
  z-index: 1;
  padding-bottom: 80px;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.5vw, 84px);
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.contact-body {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 50ch;
  margin-bottom: 48px;
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.contact-email {
  font-family: var(--font-mono);
  font-size: clamp(14px, 2vw, 20px);
  color: var(--lavender);
  text-decoration: none;
  border: 1px solid rgba(168, 158, 224, 0.25);
  padding: 12px 24px;
  letter-spacing: 0.04em;
  transition:
    background 0.25s,
    border-color 0.25s;
}
.contact-email::before {
  content: "> ";
  color: var(--text-dim);
}
.contact-email:hover {
  background: rgba(168, 158, 224, 0.08);
  border-color: var(--lavender);
}

.contact-social {
  display: flex;
  gap: 24px;
}
.contact-social a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.contact-social a::before {
  content: "./";
  color: var(--text-dim);
}
.contact-social a:hover {
  color: var(--mint);
}

.footer-base {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(168, 158, 224, 0.08);
  padding: 22px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(168, 175, 210, 0.7);
  letter-spacing: 0.04em;
}

.footer-base a {
  color: rgba(168, 175, 210, 0.7);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 175, 210, 0.25);
  transition: color 0.2s, border-color 0.2s;
}

.footer-base a:hover {
  color: rgba(200, 205, 230, 0.9);
  border-color: rgba(200, 205, 230, 0.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 960px) {
  :root {
    --pad-section: 80px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about-photo-col {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
  .photo-frame {
    width: 160px;
    height: 192px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 44px 28px;
  }
}

@media (max-width: 640px) {
  :root {
    --pad-x: 24px;
    --pad-section: 60px;
  }

  .nav {
    padding-left: 24px;
    padding-right: 24px;
  }
  .nav-links {
    gap: 20px;
  }
  .nav-links a {
    font-size: 10px;
  }

  .hero-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    padding-top: 100px;
  }

  .hero-sphere {
    width: 100px;
    height: 100px;
    animation: sphereFloat 3.8s ease-in-out infinite;
  }

  .hero-name {
    font-size: clamp(40px, 12vw, 72px);
  }

  .timeline-item {
    grid-template-columns: 20px 1fr;
    gap: 0 20px;
  }
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .contact-heading {
    font-size: clamp(32px, 9vw, 56px);
  }
  .footer-base {
    padding-left: 24px;
    padding-right: 24px;
    flex-direction: column;
    gap: 8px;
  }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-line {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 3px;
}
