:root {
  /* 60% - Primary/Neutral (Backgrounds) */
  --bg: #050505;
  --surface: #0e0e0e;
  --surface-alt: #0a0a0a;
  
  /* 30% - Secondary (Body Text & Secondary UI) */
  --text: #d1d1d1; /* Clean off-white for readability */
  --muted: #a67c32; /* Muted Bronze/Amber for secondary info */
  --line: #222222; /* Very subtle borders */
  
  /* 10% - Accent (Hero, Brand, CTAs) */
  --accent: #ffb000; /* Vibrant Glowing Amber */
  --accent-strong: #e69d00;
  --header-bg: #000000;
  --header-text: #ffb000;
  
  --max-width: 1120px;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Silkscreen', cursive;
  --font-nerdy: 'Major Mono Display', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  background-color: var(--bg);
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-main);
  line-height: 1.6;
  color: var(--text);
  /* Single site-wide background (Amber Glow) */
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 176, 0, 0.12), transparent 42%),
    radial-gradient(circle at 85% 10%, rgba(255, 176, 0, 0.08), transparent 36%),
    linear-gradient(to bottom, transparent 45%, rgba(8, 8, 8, 0.5) 100%),
    var(--bg);
  background-attachment: fixed;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 176, 0, 0.05), transparent 35%),
    radial-gradient(circle at 80% 30%, rgba(255, 140, 0, 0.04), transparent 35%),
    radial-gradient(circle at 50% 80%, rgba(139, 101, 0, 0.03), transparent 40%);
  filter: blur(10px);
  z-index: -1;
  animation: floatGlow 16s ease-in-out infinite alternate;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 1.75rem);
  padding-right: clamp(1rem, 4vw, 1.75rem);
  box-sizing: border-box;
}

.container.narrow {
  max-width: 760px;
}

.site-header {
  background: none;
  color: var(--header-text);
  position: sticky;
  top: 0.8rem;
  z-index: 1000;
  border-bottom: none;
  box-shadow: none;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 68px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(18px);
  /* Softer shadow — heavy dark shadow was reading like a bar behind the pill */
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.brand {
  color: var(--header-text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 1.02rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 176, 0, 0.4);
  background-image: url('profile.jpg');
  background-size: cover;
  background-position: center;
  background-color: var(--surface); /* Fallback color before image loads */
  box-shadow: 0 0 12px rgba(255, 176, 0, 0.15);
}

.brand-text {
  font-family: var(--font-nerdy);
  font-weight: 700;
  text-transform: lowercase; /* Major Mono looks cool in lowercase */
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: #c9d2e2;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.42rem 0.92rem;
  border-radius: 999px;
  border-bottom: none;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: #ffffff;
  background: rgba(255, 176, 0, 0.25);
  box-shadow: 0 4px 14px rgba(255, 176, 0, 0.2);
}

.nav-toggle {
  display: none; /* Hide on Desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.nav-toggle .bar {
  height: 2px;
  width: 100%;
  background-color: var(--accent);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.status-pill {
  font-family: var(--font-nerdy);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff4d7;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 176, 0, 0.35);
  background: rgba(114, 76, 25, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-transform: uppercase;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ffb000;
  box-shadow: 0 0 14px #ffb000;
}

main section[id] {
  scroll-margin-top: 6.5rem;
}

.section {
  padding: 4.6rem 0;
  /* Full viewport height — do not subtract “header height”: the nav is sticky/overlaid,
     so subtracting left a gap at the bottom where the next section’s background showed through */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.section > .container {
  flex: 0 0 auto;
  width: 100%;
}

/* Sections share the global body background — no alternate strip colors */
.section-alt {
  background: transparent;
  border: none;
}

.hero {
  /* Pull content up under the sticky header; backdrop comes from body */
  margin-top: calc(-1 * (0.8rem + 6.25rem));
  padding-top: calc(0.8rem + 6.25rem + 4.6rem);
  position: relative;
  z-index: 0;
  background: transparent;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.4;
  margin: 0 0 0.85rem;
  letter-spacing: 0.05em; /* Pixel fonts need a bit of air */
  text-transform: uppercase; /* Silkscreen is very readable in caps */
}

h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.15;
}

h1 span {
  color: #ffffff;
}

#hero-title {
  min-height: 1.2em; /* Prevent layout shift during typing */
  display: inline-block;
  border-right: 3px solid var(--accent);
  padding-right: 8px;
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  from, to { border-color: transparent }
  50% { border-color: var(--accent) }
}

/* Remove cursor once typing is done (optional, but cleaner) */
#hero-title.typing-done {
  border-right: none;
  padding-right: 0;
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
}

h3 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1.05rem;
  color: #bababa; /* Use the 30% secondary color for body text */
}

.eyebrow {
  font-family: var(--font-nerdy);
  text-transform: lowercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: #91a3c4;
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
}

.lead {
  max-width: 68ch;
  font-size: 1.04rem;
}

.hero .container {
  text-align: center;
}

.hero .lead {
  margin-left: auto;
  margin-right: auto;
}

.hero .eyebrow {
  text-align: center;
}

.hero-subtitle {
  margin: -0.1rem 0 1.15rem;
  font-size: 1.15rem;
  color: #d8e2f3;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.3rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(95, 141, 255, 0.24);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-strong);
}

.btn-secondary {
  background: transparent;
  color: #dfe6f2;
  border-color: #3a4a69;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: #4e6488;
}

h1,
h2,
h3,
.card h3 {
  color: #ffb000;
}

.grid {
  display: grid;
  gap: 1.2rem;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 1.35rem;
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card::after {
  content: "";
  position: absolute;
  top: -130%;
  left: -40%;
  width: 60%;
  height: 300%;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.1) 50%, transparent 65%);
  transform: rotate(18deg);
  transition: left 0.45s ease;
}

.card:hover {
  border-color: #375188;
  transform: translateY(-6px);
}

.card:hover::after {
  left: 110%;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.35rem;
}

.two-col > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem;
}

.skills-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.skills-list li {
  flex: 0 1 200px;
  min-width: min(100%, 160px);
  max-width: 280px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  color: #e3e9f6;
  font-weight: 600;
  border-radius: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.skills-list li:hover {
  transform: translateY(-2px);
  border-color: var(--accent); /* Only show 10% color on interaction */
}

.contact-form {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.contact-form label {
  font-weight: 600;
  color: #dce4f1;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #2c3648;
  background: #0f141c;
  color: #f0f4fb;
  padding: 0.7rem 0.8rem;
  font: inherit;
  border-radius: 8px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.contact-form button {
  width: fit-content;
  border: 1px solid var(--accent-strong);
  background: var(--accent);
  color: #ffffff;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.social-links {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  color: #d6def0;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid #3f5272;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: #ffffff;
  border-color: var(--accent);
}

.site-footer {
  border-top: 1px solid rgba(38, 50, 72, 0.6);
  background: transparent;
  padding: 1.2rem 0;
  scroll-snap-align: start;
}

.site-footer p {
  margin: 0;
  color: #93a2bd;
  font-size: 0.9rem;
}

@keyframes floatGlow {
  0% {
    transform: translate3d(-1%, -1%, 0) scale(1);
  }
  100% {
    transform: translate3d(1%, 1%, 0) scale(1.06);
  }
}

/* --- About Page Photo Layout --- */
.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-hero-grid {
    grid-template-columns: minmax(280px, 1fr) 2fr;
    gap: 4rem;
  }
}

.about-photo-wrapper {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.about-photo-frame {
  position: relative;
  aspect-ratio: 1 / 1.1;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.5rem;
  box-shadow: 0 0 30px rgba(255, 176, 0, 0.1);
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.about-photo-frame:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(255, 176, 0, 0.25);
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  filter: grayscale(100%) contrast(1.1) sepia(20%) hue-rotate(5deg); /* Cyber/Terminal tint */
  transition: filter 0.5s ease;
}

.about-photo-frame:hover .about-photo {
  filter: grayscale(0%) contrast(1.05); /* Reveal full color on hover */
}

/* Tech Scanlines over the photo */
.about-photo-frame::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    rgba(255, 176, 0, 0.05) 50%, 
    rgba(0, 0, 0, 0.15) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 10;
  border-radius: 12px;
  opacity: 0.6;
  transition: opacity 0.5s ease;
}

.about-photo-frame:hover::after {
  opacity: 0.2; /* Fade scanlines on hover */
}

@media (max-width: 760px) {
  html {
    scroll-snap-type: none; /* Disable snapping on mobile for fluid scrolling */
  }

  body {
    background-attachment: scroll;
  }

  .nav-wrap {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-radius: 999px;
    padding: 0.65rem 1.2rem;
    gap: 0;
    text-align: left;
  }

  .nav-toggle {
    display: flex; /* Show on mobile */
  }

  /* Hamburger transform to X */
  .nav-toggle.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
  .nav-toggle.active .bar:nth-child(2) { opacity: 0; }
  .nav-toggle.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

  .site-nav {
    display: none; /* Hide links by default */
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(12, 12, 12, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 176, 0, 0.15);
    border-radius: 20px;
    padding: 1.5rem;
    gap: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    font-size: 1rem;
    padding: 0.8rem;
    width: 100%;
    text-align: center;
  }

  .status-pill {
    display: none; /* Hide status pill on mobile bar to save space */
  }

  .brand {
    margin-bottom: 0;
  }

  .section {
    padding: 3.2rem 0;
    min-height: auto;
    scroll-snap-align: none;
  }

  /* Keep first screen filled on phones so About doesn’t peek under the hero */
  #home.hero {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .two-col, .cards {
    grid-template-columns: 1fr;
  }

  /* Make skills 2-column on mobile for better space usage */
  .skills-list li {
    flex: 0 1 calc(50% - 0.5rem);
    min-width: 0;
    font-size: 0.85rem;
  }

  h1 {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero {
    margin-top: calc(-1 * (0.8rem + 11rem));
    padding-top: calc(0.8rem + 11rem + 3.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }

  body::before {
    animation: none;
  }

  .btn,
  .card,
  .skills-list li,
  .contact-form button {
    transition: none;
  }
}
