:root {
  --bg: #0f172a;
  --bg-alt: #111827;
  --card-bg: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --border: #1f2933;
  --radius: 10px;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.7);
  --max-width: 960px;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #1f2937, #020617);
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
}

/* Utility containers */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* HEADER / NAV */

.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #f9fafb;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
}

/* HERO */

.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero-container {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 3vw, 3.2rem);
  margin: 0 0 0.75rem;
}

.hero h1 span {
  color: var(--accent);
}

.hero-subtitle {
  color: var(--muted);
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.hero-photo img {
  width: 100%;
  max-width: 240px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.5);
  box-shadow: var(--shadow-soft);
  display: block;
  margin: 0 auto;
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}

.btn.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.66);
}

.btn.secondary {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text);
}

.btn.secondary:hover {
  background: rgba(148, 163, 184, 0.12);
}

/* SECTIONS */

.section {
  padding: 3rem 0;
}

.section-alt {
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 1));
}

.section h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.section-intro {
  color: var(--muted);
  margin-bottom: 1.75rem;
}

/* CARDS (projects) */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.85);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
}

.card-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.card p {
  margin-bottom: 0.75rem;
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags li {
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  background: var(--accent-soft);
  color: #bfdbfe;
  font-size: 0.75rem;
}

/* TIMELINE (experience) */

.timeline {
  border-left: 1px solid rgba(148, 163, 184, 0.4);
  margin-top: 1.5rem;
  padding-left: 1.5rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.2rem;
  top: 0.3rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
}

.timeline-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.2rem 0 0.4rem;
}

.timeline ul {
  margin: 0;
  padding-left: 1.1rem;
}

/* EDUCATION */

.edu-item {
  margin-top: 1rem;
}

.edu-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* add spacing and a subtle divider between education items */
.edu-item + .edu-item {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
}

/* SKILLS */

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.skills-grid h3 {
  margin-top: 0;
}

/* CONTACT */

.contact-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.contact-list li {
  margin-bottom: 0.4rem;
}

.contact-list a {
  color: var(--accent);
}

/* FOOTER */

.site-footer {
  padding: 1.5rem 0 1.2rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

/* SCROLL REVEAL ANIMATIONS */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 2s ease-out,
    transform 2s ease-out;
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */

@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-photo {
    order: -1;
    margin-bottom: 1.5rem;
  }

  .hero-photo img {
    max-width: 180px;
  }

  .main-nav {
    position: absolute;
    top: 56px;
    right: 0;
    background: rgba(2, 6, 23, 0.98);
    padding: 0.75rem 1rem 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 170px;
    display: none;
    border-bottom-left-radius: 12px;
    border-left: 1px solid rgba(148, 163, 184, 0.4);
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  }

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

  .nav-toggle {
    display: block;
  }
}

/* PROJECT PAGES */

.logo a.logo-link {
  color: inherit;
  text-decoration: none;
}

.project-hero {
  padding: 3.5rem 0 2.5rem;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), rgba(15, 23, 42, 1));
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.project-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.3fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.project-subtitle {
  color: var(--muted);
  max-width: 38rem;
}

.project-facts {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 1.2rem 1.3rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.9);
}

.project-facts h2 {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.project-facts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-facts li {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.project-cover img,
.project-cover video,
.project-cover audio {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.95);
}

.project-caption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
}

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

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.project-gallery img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Responsive tweaks for project pages */
@media (max-width: 768px) {
  .project-hero-grid {
    grid-template-columns: 1fr;
  }

  .project-facts {
    order: -1;
  }
}

.card-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}