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

:root {
  --dark:          #0f172a;
  --accent:        #f59e0b; /* use on dark backgrounds only */
  --accent-light:  #b45309; /* use on light backgrounds — passes AA contrast on white */
  --accent-hover:  #d97706;
  --white:         #ffffff;
  --off-white:     #f8fafc;
  --border:        #e2e8f0;
  --text:          #1e293b;
  --text-muted:    #475569;
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Accessibility ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--accent);
  color: var(--dark);
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

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

/* ── Base ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  gap: 1rem;
}

.nav-name {
  font-family: var(--font-display);
  color: var(--white);
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-name:hover { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  justify-content: flex-end;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }

/* ── Layout helpers ── */
section { scroll-margin-top: 4rem; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 0.6rem;
}

section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 2.5rem;
  line-height: 1.2;
}

/* ── Hero ── */
#hero {
  background: var(--dark);
  padding: 6rem 2rem 5rem;
}

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-tagline {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.05rem;
  max-width: 460px;
  margin-bottom: 2.25rem;
  line-height: 1.75;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--dark);
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}
.btn:hover,
.btn:focus-visible { background: var(--accent-hover); }

/* ── Carousel ── */
.carousel {
  position: relative;
  width: 320px;
  height: 400px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  flex-shrink: 0;
}

.carousel-slides {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.carousel-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s;
}
.carousel-btn:hover,
.carousel-btn:focus-visible { background: rgba(15, 23, 42, 0.95); }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--white);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.carousel-dots button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide { transition: none; }
}

/* ── About ── */
#about {
  padding: 5rem 2rem;
  background: var(--off-white);
}

#about p.body-text {
  font-size: 1.05rem;
  line-height: 1.85;
  max-width: 660px;
  color: var(--text);
}

/* ── Experience ── */
#experience {
  padding: 5rem 2rem;
  background: var(--white);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 2.5rem;
  padding: 0 0 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.timeline-meta {
  text-align: right;
  padding-top: 0.15rem;
}

.timeline-dates {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 0.35rem;
}

.timeline-org {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.timeline-location {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.9rem;
  line-height: 1.4;
}

.timeline-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-content li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.65;
}
.timeline-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  background: var(--accent-light);
  border-radius: 50%;
}

/* ── Education ── */
#education {
  padding: 5rem 2rem;
  background: var(--off-white);
}

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.edu-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-light);
  padding: 1.75rem;
}

.edu-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.edu-degree {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.edu-year {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.edu-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.edu-card li {
  font-size: 0.84rem;
  color: var(--text-muted);
  padding-left: 0.9rem;
  position: relative;
  line-height: 1.5;
}
.edu-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 4px;
  height: 4px;
  background: var(--accent-light);
  border-radius: 50%;
}

/* ── Work Samples ── */
#work {
  padding: 5rem 2rem;
  background: var(--dark);
}

#work .section-label { color: var(--accent); }
#work h2 { color: var(--white); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.work-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: background 0.2s, border-color 0.15s;
}
a.work-card:hover,
a.work-card:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
}

.work-card-type {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.work-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.45;
  margin-bottom: 0.6rem;
}

.work-card p.work-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  flex: 1;
}

.work-card-cta {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

/* ── Work carousel ── */
.work-carousel {
  position: relative;
}

.work-carousel-track {
  display: grid;
  grid-template-areas: "stack";
}

.work-carousel-slide {
  grid-area: stack;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.work-carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.work-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2.25rem;
}

.work-carousel-btn {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}
.work-carousel-btn:hover,
.work-carousel-btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
}

.work-carousel-dots {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.work-carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.work-carousel-dots button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .work-carousel-slide { transition: none; }
}

/* ── Contact ── */
#contact {
  padding: 5rem 2rem;
  background: var(--white);
}

#contact h2 { margin-bottom: 0.75rem; }

.contact-intro {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2.25rem;
  max-width: 440px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.contact-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 55px;
}

.contact-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.contact-value:hover { color: var(--accent-light); }

/* ── Login page ── */
.login-body {
  background: var(--dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-main {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3rem 2.5rem;
  text-align: center;
}

.login-eyebrow {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.login-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.login-instruction {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.login-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.login-input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}
.login-input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.login-submit {
  width: 100%;
  margin-top: 1rem;
  text-align: center;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.875rem;
}

@media (max-width: 480px) {
  .login-card { padding: 2.25rem 1.5rem; }
}

/* ── Footer ── */
footer {
  background: var(--dark);
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .carousel {
    width: 100%;
    max-width: 360px;
    height: 320px;
    margin: 0 auto;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .timeline-meta { text-align: left; }

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

  nav { padding: 0.875rem 1rem; }
}
