/* ---------------------------------------------------------
   Wogan May — personal site
   Dark theme: dark grays + purple accent
   --------------------------------------------------------- */

:root {
  /* Surfaces */
  --bg:        #0d0d11;
  --bg-soft:   #14141b;
  --surface:   #1a1a23;
  --surface-2: #20202b;
  --border:    #2c2c38;

  /* Text */
  --text:      #ecebf2;
  --text-soft: #a8a6b8;
  --text-dim:  #6f6d80;

  /* Accent (purple) */
  --accent:      #a06bff;
  --accent-2:    #c89bff;
  --accent-deep: #7c3aed;
  --accent-glow: rgba(160, 107, 255, 0.18);

  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1080px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* Full-screen background image + darkening overlay ------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    /* purple-tinted accent glows */
    radial-gradient(60rem 40rem at 75% -10%, var(--accent-glow), transparent 60%),
    radial-gradient(50rem 40rem at 0% 20%, rgba(124, 58, 237, 0.10), transparent 55%),
    /* dark wash to keep content readable */
    linear-gradient(180deg, rgba(13, 13, 17, 0.82), rgba(13, 13, 17, 0.9)),
    /* the cityscape */
    url("background.jpg");
  background-size: cover, cover, cover, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
}

/* Header / Nav ------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(13, 13, 17, 0.7);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand-accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
  transition: border-color .2s ease, background .2s ease;
}
.nav-cta:hover { border-color: var(--accent); background: var(--accent-glow); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease;
}

/* Hero --------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  padding-top: clamp(4rem, 12vh, 8rem);
  padding-bottom: clamp(3rem, 8vh, 6rem);
}
.hero-portrait {
  justify-self: center;
  position: relative;
  width: clamp(220px, 28vw, 320px);
  aspect-ratio: 1;
}
.hero-portrait::before {
  content: "";
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  filter: blur(8px);
  z-index: -1;
}
.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-shadow: 0 0 0 6px rgba(160, 107, 255, 0.08), 0 24px 60px -20px rgba(0, 0, 0, 0.7);
}
.eyebrow {
  color: var(--accent-2);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  max-width: 16ch;
}
.grad-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  color: var(--text-soft);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 56ch;
  margin: 0 0 2.25rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Buttons ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--accent-deep), var(--accent));
  color: #fff;
  box-shadow: 0 8px 30px -8px var(--accent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px -8px var(--accent); }
.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-glow); }

/* Sections ----------------------------------------------- */
.section { padding-block: clamp(3.5rem, 9vh, 6rem); }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}
.section-index {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
  margin: 0;
}
.section-lede {
  color: var(--text-soft);
  margin: 0 0 2.5rem;
  max-width: 60ch;
}

/* About -------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.about-body p {
  color: var(--text-soft);
  margin: 0 0 1.15rem;
}
.about-body p:first-child {
  color: var(--text);
  font-size: 1.1rem;
}
.about-aside {
  display: grid;
  gap: 0.75rem;
  position: sticky;
  top: 92px;
}
.fact-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.fact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.fact-value { font-weight: 600; color: var(--text); }

/* Projects ----------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.project-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px -20px var(--accent);
}
.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.project-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-2);
  background: var(--accent-glow);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.project-year { color: var(--text-dim); font-size: 0.85rem; }
.project-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0;
}
.project-desc { color: var(--text-soft); font-size: 0.95rem; margin: 0; flex: 1; }
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
}
.project-stack li {
  font-size: 0.78rem;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

/* Contact ------------------------------------------------ */
.contact-card {
  text-align: center;
  background:
    radial-gradient(40rem 20rem at 50% 0%, var(--accent-glow), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
.contact-lede { color: var(--text-soft); margin: 0 auto 2rem; max-width: 44ch; }
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.social-links a {
  padding: 0.65rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 500;
  color: var(--text-soft);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.social-links a:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

/* Footer ------------------------------------------------- */
.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* Reveal on scroll --------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* Responsive --------------------------------------------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { padding: 0.25rem clamp(1.25rem, 4vw, 2.5rem); }
  .nav-links li a { display: block; padding: 0.6rem 0; }
  .nav-cta { text-align: center; }

  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-portrait { order: -1; }
  .hero-title { max-width: none; }
  .hero-lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }

  .about-grid { grid-template-columns: 1fr; }
  .about-aside { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .about-aside { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
