/* ============================================================
   PRUE STEADSON — PORTFOLIO
   ============================================================ */

/* Variables */
:root {
  --bg:         #1A1A2E;
  --surface:    #252540;
  --accent:     #B8FF57;
  --text:       #F0F0F0;
  --muted:      #B0B0C8;
  --border:     rgba(255,255,255,0.08);
  --font-head:  'Outfit', sans-serif;
  --font-body:  'Inter', sans-serif;
  --radius:     10px;
  --max-w:      1200px;
  --nav-h:      80px;
}

/* Light mode */
body.light {
  --bg:      #F5F5F0;
  --surface: #EAEAE4;
  --text:    #1A1A2E;
  --muted:   #555570;
  --border:  rgba(0,0,0,0.08);
  --accent:  #2D7A00;
}

/* Light mode nav fix */
body.light .nav {
  background: #EAEAE4;
}

body.light .nav-links a {
  color: #1A1A2E;
}

body.light .nav-links a:hover {
  color: #2D7A00;
}

body.light .nav-btn {
  color: #1A1A2E;
  border-color: #1A1A2E;
}

body.light .nav-btn:hover {
  color: #F5F5F0;
  border-color: #2D7A00;
}

/* High contrast */
body.high-contrast {
  --bg:      #000;
  --surface: #111;
  --text:    #fff;
  --muted:   #ddd;
  --border:  rgba(255,255,255,0.3);
  --accent:  #fff;
}

/* Large text */
body.large-text {
  font-size: 120%;
}

body.large-text p,
body.large-text li,
body.large-text .hero-role,
body.large-text .about-bio,
body.large-text .contact-link-sub,
body.large-text .project-tags span,
body.large-text .nav-links a {
  font-size: 1.2em;
}

body.large-text h1,
body.large-text .hero-name {
  font-size: clamp(90px, 13vw, 150px);
}

body.large-text h2 {
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
}

body.large-text h3,
body.large-text .project-card-info h3 {
  font-size: 1.5rem;
}

/* Dyslexia font */
body.dyslexia {
  --font-head: 'Comic Sans MS', cursive;
  --font-body: 'Comic Sans MS', cursive;
  letter-spacing: 0.05em;
  word-spacing: 0.1em;
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.08;
}

h1 { font-size: clamp(3.5rem, 8vw, 6.25rem); line-height: 108px; }
h2 { font-size: clamp(2.5rem, 5vw, 4rem); }
h3 { font-size: 1.15rem; font-weight: 500; }

em {
  font-style: italic;
  color: var(--accent);
}

.section-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 6px;
  transition: border-color 0.2s, background 0.2s;
}

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

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #141426;
  transition: background 0.3s;
}

.nav-inner {
  display: flex;
  align-items: center;
  padding: 0 50px;
  height: var(--nav-h);
  max-width: 1290px;
  margin: 0 auto;
  width: 100%;
  }


.nav-border {
  height: 1px;
  background: var(--border);
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 48px;
  align-items: center;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

/* Animated resume button */
.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 24px;
  padding: 10px 24px;
  border: 1.5px solid var(--text);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text);
  overflow: hidden;
  transition: color 0.3s, border-color 0.3s;
  text-decoration: none;
}

.nav-btn-bg {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
}

.nav-btn:hover .nav-btn-bg {
  transform: translateY(0);
}

.nav-btn:hover {
  color: var(--bg);
  border-color: var(--accent);
}

.nav-btn-text {
  position: relative;
  z-index: 1;
}

.mobile-only { display: none; }

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  position: relative;
  width: 100%;
  border-bottom: 1px solid rgba(184,255,87,0.15);
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  animation: fadeUp 0.9s ease both;
  max-width: 1290px;
  margin: 0 auto;
  width: 100%;
  padding: 0 50px;
}

.hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-name {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(80px, 12vw, 140px);
  line-height: 0.88;
  letter-spacing: -4px;
  color: var(--text);
}

.hero-name em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-currently {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-currently-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
}

.hero-currently-logo {
  height: 20px;
  width: auto;
  opacity: 0.8;
}

.hero-tags {
  display: none;
}

.hero-cta {
  align-self: flex-start;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.2s;
  cursor: pointer;
}

.hero-cta:hover {
  opacity: 0.7;
  transform: none;
}

.hero-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo-wrap {
  transform: rotate(4deg);
  box-shadow: -8px 12px 40px rgba(0,0,0,0.5);
  border-radius: 4px;
  overflow: hidden;
  width: 260px;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 3/4;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   WORKS
   ============================================================ */

.works {
  padding: 100px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.works-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 64px;
}

.works-intro {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 340px;
  padding-top: 8px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0 40px;
  align-items: start;
}

.project-card--large {
  grid-column: 1 / -1;
  margin-bottom: 40px;
}

.project-card:nth-child(2) {
  margin-top: 0;
}

.project-card:nth-child(3) {
  margin-top: 120px;
}

.project-card--large .project-card-image {
  aspect-ratio: 16/7;
  border-radius: 0;
 
}

.project-card:nth-child(2) .project-card-image {
  aspect-ratio: 4/3;
  border-radius: 0;
 
}

.project-card:nth-child(3) .project-card-image {
  aspect-ratio: 1/1;
  border-radius: 0;
  
}

.project-card-link {
  display: block;
}

.project-card-image {
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

.project-card--large .project-card-image {
  aspect-ratio: 16/7;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-card-link:hover .project-card-image img {
  transform: scale(1.03);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,26,46,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: 0;
}

.card-arrow {
  font-size: 0.75em;
  color: var(--muted);
  transition: color 0.2s;
  vertical-align: middle;
}

.project-card-link:hover .card-arrow {
  color: var(--accent);
}

.project-card-link:hover .project-card-overlay {
  opacity: 1;
}

.project-card-info {
  padding: 20px 0 8px;
}

.project-card-info h3 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 200;
  margin-bottom: 10px;
  transition: color 0.2s;
  line-height: 1.1;
}

.project-card-link:hover .project-card-info h3 {
  color: var(--accent);
}

.project-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.project-tags span {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about {
  background: var(--surface);
  padding: 100px 50px;
}

.about-inner {
  max-width: 1290px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 80px;
  align-items: start;
  padding: 0 50px;
}

.about-left h2 {
  margin-top: 8px;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 8px;
}

.about-bio {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.85;
}

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

.contact {
  padding: 100px 50px;
  max-width: 1290px;
  margin: 0 auto;
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.contact-header h2 {
  margin-top: 8px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: color 0.2s;
  group: true;
}

.contact-link-label {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  transition: color 0.2s;
  flex-shrink: 0;
}

.contact-link-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

.contact-link-arrow {
  font-size: 1.4rem;
  color: var(--muted);
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.25s ease, color 0.2s;
}

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

.contact-link:hover .contact-link-sub {
  color: var(--accent);
  opacity: 0.7;
}

.contact-link:hover .contact-link-arrow {
  color: var(--accent);
  transform: translate(3px, -3px);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  background: var(--surface);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}

.footer-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

.footer-links a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--muted);
}

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

.a11y-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
}

.a11y-gear {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.4s;
}

.a11y-gear:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.a11y-gear.open {
  transform: rotate(60deg);
  color: var(--accent);
  border-color: var(--accent);
}

.a11y-panel {
  position: absolute;
  bottom: 54px;
  right: 0;
  width: 218px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.a11y-panel:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.a11y-title {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.a11y-row label {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.toggle {
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  border: none;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle[aria-checked="true"] {
  background: var(--accent);
}

.toggle-thumb {
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3.5px;
  left: 3.5px;
  transition: left 0.2s;
}

.toggle[aria-checked="true"] .toggle-thumb {
  left: 17px;
  background: var(--bg);
}

.a11y-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0 12px;
}

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

@media (max-width: 900px) {
  .nav {
    padding: 0 24px;
  }

  .nav-links,
  .nav .btn-outline {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .mobile-only {
    display: block;
  }

  .mobile-only a {
    display: inline-block;
    border: 1.5px solid var(--text);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
  }

  .mobile-only a:hover {
    border-color: var(--accent);
    color: var(--accent);
  }

  .hero {
    padding: calc(var(--nav-h) + 32px) 24px 80px;
  }

  .hero-inner {
    flex-direction: column;
    gap: 32px;
  }

  .hero-right {
    align-self: center;
  }

  .hero-scroll-indicator {
    left: 24px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .project-card--large {
    margin-bottom: 0;
  }

  .project-card:nth-child(3) {
    margin-top: 0;
  }

  .works {
    padding: 64px 24px;
  }

  .works-header {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card--large {
    grid-column: auto;
  }

  .about {
    padding: 64px 24px;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact {
    padding: 64px 24px;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 24px;
  }

  .footer-inner {
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-links {
    margin-left: 0;
  }
}

.hero-sub {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-currently {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-currently-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
}

.hero-currently-logo {
  height: 22px;
  width: auto;
  opacity: 0.8;
}

.hero-role {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 200;
  color: var(--muted);
  line-height: 25px;
  max-width: 41ch;
}

.hero-currently-label {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 200;
  color: var(--muted);
  line-height: 25px;
}

body.large-text .a11y-panel {
  width: 280px;
  padding: 24px;
}

body.large-text .a11y-title {
  font-size: 13px;
}

body.large-text .a11y-row label {
  font-size: 16px;
}

body.large-text .toggle {
  width: 44px;
  height: 26px;
}

body.large-text .toggle-thumb {
  width: 18px;
  height: 18px;
}

body.large-text .toggle[aria-checked="true"] .toggle-thumb {
  left: 22px;
}

body.large-text .nav-inner {
  height: 120px;
}

body.large-text .nav-links a {
  font-size: 22px;
}

body.large-text .nav-logo img {
  height: 50px;
}

body.large-text {
  --nav-h: 120px;
}

body.large-text .nav-btn-text {
  font-size: 1.2em;
}

body.large-text .nav-btn {
  padding: 16px 32px;
}

body.large-text .project-card-info h3 {
  font-size: 2.4rem;
}

body.light .hero-currently-logo {
  filter: brightness(0);
}

.card-arrow,
.contact-link-arrow,
.cs-back,
.cs-next-title,
.cs-live-link {
  font-variant-emoji: text;
}

.hero-scroll-indicator {
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  .nav .nav-btn {
    display: none;
  }
}

@media (max-width: 900px) {
  .mobile-only a {
    display: inline-block;
    border: 1.5px solid var(--text);
    color: var(--text);
    padding: 10px 20px;
    border-radius: 6px;
    margin-top: 8px;
  }

  .mobile-only a:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.mobile-only a {
  font-size: 18px !important;
}