/* Corporate ML portfolio — cool slate / steel-blue */

:root {
  --bg: #0f1419;
  --bg-elevated: #161d26;
  --surface: #1a2330;
  --text: #e8eef4;
  --text-muted: #9aabbc;
  --accent: #3d7ea6;
  --accent-soft: rgba(61, 126, 166, 0.18);
  --line: rgba(232, 238, 244, 0.12);
  --line-strong: rgba(232, 238, 244, 0.22);
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --space: clamp(1.25rem, 3vw, 2rem);
  --max: 68rem;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: #b8d4e8;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(15, 20, 25, 0.78);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem var(--space);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--text-muted);
}

.nav a:hover,
.nav-contact:hover {
  color: var(--text);
}

.nav-contact {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: inherit;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

/* Hero */

.hero {
  position: relative;
  min-height: min(100vh, 52rem);
  display: flex;
  align-items: flex-end;
  padding: clamp(4rem, 12vh, 7rem) var(--space) clamp(3rem, 8vh, 5rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(61, 126, 166, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 70%, rgba(45, 90, 120, 0.22), transparent 50%),
    linear-gradient(165deg, #121820 0%, #0f1419 45%, #15202b 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 85%);
  opacity: 0.55;
}

.hero-inner {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
}

.hero-label {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero-title {
  margin: 1rem 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 600;
  color: #c5d8e8;
}

.hero-tagline {
  margin: 1.1rem 0 0;
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #f4f8fb;
}

.btn-primary:hover {
  background: #4a8fb8;
  color: #fff;
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: #9aabbc;
  color: #fff;
}

/* Sections */

.section {
  padding: clamp(3.5rem, 10vh, 6rem) var(--space);
  border-top: 1px solid var(--line);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
}

.about-text {
  margin: 0;
  max-width: 46rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.about-meta {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.skills {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills li {
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: #c5d8e8;
  background: var(--accent-soft);
  border: 1px solid rgba(61, 126, 166, 0.35);
  border-radius: var(--radius);
}

/* Experience timeline */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 1px;
  background: var(--line-strong);
  transform-origin: top;
}

.timeline-item {
  position: relative;
  padding: 0 0 2.25rem 2rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.timeline-role {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.timeline-meta {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.timeline-company {
  color: #c5d8e8;
  font-weight: 500;
}

.timeline-bullets {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
}

.timeline-bullets li {
  margin-bottom: 0.4rem;
}

.timeline-bullets li:last-child {
  margin-bottom: 0;
}

/* Projects — clean split list, not cards */

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

.project-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

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

@media (min-width: 720px) {
  .project-item {
    grid-template-columns: minmax(10rem, 0.4fr) minmax(0, 1fr);
    align-items: start;
  }
}

.project-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
}

.project-period {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.project-summary {
  margin: 0;
  color: var(--text-muted);
}

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

.project-tech li {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.1rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem var(--space);
  background: var(--bg-elevated);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.footer-inner a,
.footer-links button {
  font-weight: 600;
  color: #c5d8e8;
  text-decoration: none;
}

.footer-inner a:hover,
.footer-links button:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.footer-links button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

.footer-sep {
  margin: 0 0.4rem;
  opacity: 0.5;
}

/* Contact modal */

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space);
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 16, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.contact-modal.is-open .contact-modal-backdrop {
  opacity: 1;
}

.contact-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  padding: 1.75rem 1.5rem 1.5rem;
  background:
    radial-gradient(ellipse 90% 70% at 10% 0%, rgba(61, 126, 166, 0.2), transparent 55%),
    var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  transform: translateY(0.75rem) scale(0.98);
  opacity: 0;
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}

.contact-modal.is-open .contact-modal-panel {
  opacity: 1;
  transform: none;
}

.contact-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.contact-modal-close:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.contact-modal-panel .section-eyebrow {
  margin-bottom: 0.35rem;
}

.contact-modal-panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.15rem);
  font-weight: 400;
  line-height: 1.15;
}

.contact-modal-copy {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.contact-options {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.contact-option {
  display: grid;
  gap: 0.15rem;
  padding: 0.95rem 1rem;
  text-decoration: none;
  color: var(--text);
  background: rgba(26, 35, 48, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.contact-option:hover {
  color: var(--text);
  border-color: rgba(61, 126, 166, 0.55);
  background: var(--accent-soft);
}

.contact-option-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact-option-value {
  font-size: 1rem;
  font-weight: 500;
  word-break: break-word;
}

/* Motion */

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.hero-reveal {
  transition-delay: 0.08s;
}

.timeline.is-drawn::before {
  animation: timeline-draw 1.1s var(--ease) forwards;
}

@keyframes timeline-draw {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .timeline.is-drawn::before {
    animation: none;
  }

  .contact-modal-backdrop,
  .contact-modal-panel {
    transition: none;
  }
}

@media (max-width: 520px) {
  .nav {
    font-size: 0.82rem;
  }

  .hero {
    align-items: center;
    min-height: 90vh;
  }
}
