:root {
  --navy: #0d1117;
  --navy-soft: #161b22;
  --navy-border: #21262d;
  --gold: #c9a84c;
  --gold-dim: #8a6f2e;
  --teal: #4caeac;
  --teal-dim: #2d7a78;
  --off-white: #e8e4dc;
  --muted: #8b8680;
  --subtle: #30363d;

  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  --nav-width: 200px;
  --content-max: 780px;
  --section-gap: 7rem;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--navy);
  color: var(--off-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
img {
  display: block;
  max-width: 100%;
}

/* ============================================================
   SIDE NAV
   ============================================================ */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--navy-border);
  z-index: 100;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
}

.side-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  transition:
    color 0.2s,
    background 0.2s;
  display: block;
}

.nav-link:hover {
  color: var(--off-white);
}

.nav-link.active {
  color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
main {
  margin-left: var(--nav-width);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 5rem 4rem;
  position: relative;
  border-bottom: 1px solid var(--navy-border);
}

.hero-inner {
  max-width: var(--content-max);
}

.hero-name-block {
  position: relative;
  margin-bottom: 2rem;
}

.name {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--off-white);
}

.hero-role {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
  font-family: var(--font-mono);
  font-size: 14px;
}

.role-prefix {
  color: var(--teal);
}

.role-text {
  color: var(--off-white);
}

.hero-tagline {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-link {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--muted);
  border: 1px solid var(--navy-border);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.hero-link:hover {
  color: var(--off-white);
  border-color: var(--subtle);
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section {
  padding: var(--section-gap) 5rem;
  border-bottom: 1px solid var(--navy-border);
  margin-bottom: 20px;
}

.section--last {
  border-bottom: none;
}

.section-inner {
  max-width: var(--content-max);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 3rem;
}

.section-intro {
  font-size: 14px;
  color: var(--muted);
  margin-top: -2rem;
  margin-bottom: 2rem;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--off-white);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.8;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text em {
  color: var(--gold);
  font-style: normal;
}

.about-meta {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.25rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dim);
}

.meta-value {
  font-size: 13px;
  color: var(--off-white);
  line-height: 1.5;
}

/* ============================================================
EXPERIENCE
   ============================================================ */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.experience-item {
  padding-left: 1.25rem;
  border-left: 1px solid var(--navy-border);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.experience-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--off-white);
  margin-bottom: 0.2rem;
}

.experience-org {
  font-size: 13px;
  color: var(--muted);
}

.experience-detail {
  color: var(--subtle);
  font-size: 12px;
}

.experience-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.experience-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 1rem;
  list-style: disc;
}

.experience-bullets li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  padding-left: 0.25rem;
}

.experience-bullets li::marker {
  color: var(--subtle);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.project-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  border-top: 1px solid var(--navy-border);
}

.project-item:last-child {
  border-bottom: 1px solid var(--navy-border);
}

.project-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 2.5rem 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  text-align: left;
  transition: opacity 0.15s;
}

.project-toggle:hover {
  opacity: 0.75;
}

.project-toggle[aria-expanded="true"] .project-arrow {
  display: inline-block;
  transform: rotate(180deg);
}

.project-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
}

.project-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--off-white);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  background: var(--navy-soft);
  border: 1px solid var(--navy-border);
  color: var(--teal);
  letter-spacing: 0.04em;
}

.project-arrow {
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.2s ease-out;
}

.project-body {
  padding: 0 0 1.5rem 3.5rem;
}

.project-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
  max-width: 560px;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal);
  transition: color 0.15s;
}

.project-link:hover {
  color: var(--off-white);
}

/* ============================================================
   PROJECT PREVIEW IMAGE
   ============================================================ */
.project-preview {
  margin-bottom: 1.25rem;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--navy-border);
  background: var(--navy-soft);
  max-width: 560px;
  aspect-ratio: 16 / 9;
  position: relative;
}

.project-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: opacity 0.2s;
}

/* Fallback pattern shown when image is missing/loading */
.project-preview-img[src=""] ,
.project-preview-img:not([src]) {
  opacity: 0;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 3rem;
  margin-bottom: 3rem;
}

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dim);
  margin-bottom: 0.75rem;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skill-list li {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* Courses */
.courses-block {
  border-top: 1px solid var(--navy-border);
  padding-top: 2rem;
}

.courses-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.course-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.course-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--off-white);
}

.course-org {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-block {
  max-width: 560px;
}

.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--off-white);
  margin-bottom: 1rem;
}

.contact-body {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.contact-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 1px;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.contact-cta:hover {
  color: var(--off-white);
  border-color: var(--off-white);
}

.contact-secondary {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
}

.contact-secondary:hover {
  color: var(--off-white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-width: 0px;
  }

  .side-nav {
    display: none;
  }

  main {
    margin-left: 0;
  }

  .hero,
  .section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero {
    padding-top: 5rem;
    padding-bottom: 3rem;
  }

  .project-toggle {
    grid-template-columns: 2rem 1fr auto;
  }

  .project-tags {
    display: none;
  }

  .project-body {
    padding-left: 2rem;
  }

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

  .experience-header {
    flex-direction: column;
    gap: 0.25rem;
  }
}
