:root {
  --accent: #FFC107;
  --accent-strong: #ffb300;
  --bg: #f5f7fa;
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #ffffff;
  --surface-alt: #eef1f5;
  --text: #17191d;
  --muted: #69707c;
  --line: rgba(23, 25, 29, .10);
  --shadow: 0 18px 50px rgba(22, 29, 37, .10);
  --shadow-hover: 0 24px 64px rgba(255, 193, 7, .24);
  --header: rgba(245, 247, 250, .76);
  --container: 1120px;
  --radius: 24px;
}

:root[data-theme="dark"] {
  --bg: #191b1f;
  --surface: rgba(31, 34, 39, .86);
  --surface-solid: #22252b;
  --surface-alt: #14161a;
  --text: #f4f5f7;
  --muted: #a7adb7;
  --line: rgba(255, 255, 255, .10);
  --shadow: 0 18px 50px rgba(0, 0, 0, .30);
  --shadow-hover: 0 24px 64px rgba(255, 193, 7, .18);
  --header: rgba(25, 27, 31, .76);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background .3s ease, color .3s ease;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.narrow { max-width: 820px; }

.section {
  position: relative;
  padding: 110px 0;
}

.section-alt {
  background: var(--surface-alt);
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: -100px;
  left: 20px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #111;
  font-weight: 800;
}
.skip-link:focus { top: 20px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
  background: var(--header);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-right: auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #141414;
  box-shadow: 0 8px 22px rgba(255, 193, 7, .20);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.main-nav a,
.legal-links button {
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  transition: color .2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.legal-links button:hover,
.legal-links button:focus-visible {
  color: var(--text);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .05);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 193, 7, .55);
  box-shadow: 0 12px 28px rgba(255, 193, 7, .18);
}

.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 100px;
  overflow: clip;
}
.hero::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  top: -190px;
  left: -180px;
  border-radius: 50%;
  background: rgba(255, 193, 7, .10);
  filter: blur(30px);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  align-items: center;
  gap: 80px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: .83rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: .98;
  letter-spacing: -.065em;
  max-width: 900px;
}
h1 span, h2 span { color: var(--accent-strong); }

.hero-text {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.17rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 26px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border-radius: 15px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
  background: var(--accent);
  color: #131313;
  box-shadow: 0 12px 28px rgba(255, 193, 7, .18);
}
.button-primary:hover { box-shadow: 0 16px 34px rgba(255, 193, 7, .30); }
.button-ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: .92rem;
}

.profile-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 460px;
}
.profile-ring {
  width: min(360px, 72vw);
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 50%;
  background: conic-gradient(from 30deg, var(--accent), transparent 28%, rgba(255,255,255,.08) 65%, var(--accent));
  box-shadow: 0 0 90px rgba(255, 193, 7, .12);
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-img-actual {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 8px solid var(--surface-solid);
  background-color: var(--surface-solid);
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.18), transparent 25%),
    linear-gradient(145deg, #2d3138, #111317);
  color: var(--accent);
  font-size: clamp(5rem, 12vw, 8rem);
  font-weight: 800;
  letter-spacing: -.08em;
  border: 8px solid var(--surface-solid);
}
.profile-badge {
  position: absolute;
  right: 5%;
  bottom: 6%;
  padding: 11px 15px;
  border-radius: 14px;
  background: var(--surface-solid);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: .82rem;
  font-weight: 800;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .15em;
}
.scroll-line {
  width: 60px;
  height: 1px;
  background: var(--line);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 48px;
}
.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.05em;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(255, 193, 7, .75);
  transition: width .35s ease;
}
.card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 193, 7, .35);
  box-shadow: var(--shadow-hover);
}
.card:hover::before { width: 100%; }

.about-card {
  padding: 30px;
}
.about-card p {
  color: var(--muted);
  font-size: 1.05rem;
}
.about-card p:last-child { margin-bottom: 0; }
.about-card strong { color: var(--text); }

.timeline {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 10px;
  width: 1px;
  background: linear-gradient(var(--accent), transparent);
}
.timeline-item {
  position: relative;
  padding-left: 48px;
  margin-bottom: 26px;
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  top: 24px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 193, 7, .12), 0 0 20px rgba(255, 193, 7, .55);
}
.timeline-content { padding: 26px; }
.timeline-date {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.timeline-content h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}
.timeline-content p {
  margin-bottom: 0;
  color: var(--muted);
}

.skills-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.skill-card {
  min-height: 320px;
  padding: 28px;
}
.card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 15px;
  background: rgba(255, 193, 7, .13);
  color: var(--accent-strong);
  font-size: 1.2rem;
  font-weight: 800;
}
.skill-card h3 { margin-bottom: 18px; }
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.tag-list span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .86rem;
  background: var(--surface-solid);
}
.language-list {
  display: grid;
  gap: 12px;
}
.language-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.language-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.language-list span { color: var(--text); }
.language-list strong { color: var(--muted); font-size: .85rem; }

.project-grid {
  grid-template-columns: repeat(2, 1fr);
}
.project-card {
  display: block;
  min-height: 430px;
}

.project-visual {
  height: 220px;
  display: grid;
  place-items: center;
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -.07em;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--surface-solid);
}
.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.project-card:hover .project-visual img {
  transform: scale(1.05);
}

.visual-portfolio {
  background:
    radial-gradient(circle at 70% 30%, rgba(255,193,7,.38), transparent 22%),
    linear-gradient(135deg, #1a1d21, #343941);
  color: var(--accent);
}
.visual-iris {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,193,7,.30), transparent 18%),
    linear-gradient(135deg, #111317, #2a2e35);
  color: #f4f5f7;
}
.project-body { padding: 26px; }
.project-kicker {
  margin-bottom: 7px;
  color: var(--accent-strong);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.project-body h3 { margin-bottom: 8px; font-size: 1.3rem; }
.project-body p {
  color: var(--muted);
  margin-bottom: 18px;
}
.project-link {
  color: var(--text);
  font-weight: 800;
}

.contact-section { padding-top: 20px; }
.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 32px;
}
.contact-card h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -.045em;
}
.contact-card p:last-child { margin-bottom: 0; color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: .9rem;
}
.footer-inner p { margin: 0; }
.legal-links {
  display: flex;
  gap: 18px;
}

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .18s ease;
}
.modal.is-open { opacity: 1; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 15, .66);
  backdrop-filter: blur(8px);
}
.modal-panel {
  position: relative;
  width: min(680px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface-solid);
  box-shadow: 0 30px 100px rgba(0,0,0,.34);
  transform: translateY(10px) scale(.985);
  transition: transform .18s ease;
}
.modal.is-open .modal-panel { transform: translateY(0) scale(1); }
.modal-panel h2 {
  margin-bottom: 20px;
  font-size: 2rem;
  letter-spacing: -.04em;
}
.modal-panel p { color: var(--muted); }
.modal-panel a { color: var(--accent-strong); font-weight: 700; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.cookie-banner {
  position: fixed;
  z-index: 1500;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-solid);
  box-shadow: 0 24px 70px rgba(0,0,0,.20);
  transform: translateY(calc(100% + 30px));
  opacity: 0;
  pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
}
.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-banner strong { display: block; margin-bottom: 4px; }
.cookie-banner p { margin: 0; color: var(--muted); font-size: .86rem; }
.cookie-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .7s cubic-bezier(.2,.8,.2,1),
    transform .7s cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .main-nav { gap: 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 45px; }
  .profile-shell { min-height: 350px; }
  .skills-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .header-inner { min-height: 64px; gap: 14px; }
  .brand-name { display: none; }
  .main-nav {
    overflow-x: auto;
    gap: 14px;
    padding-bottom: 1px;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { white-space: nowrap; font-size: .84rem; }
  .section { padding: 80px 0; }
  .hero { min-height: auto; padding-top: 72px; }
  h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .scroll-cue { display: none; }
  .about-card, .timeline-content, .skill-card, .project-body, .contact-card { padding: 24px; }
  .contact-card { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; flex-direction: column; align-items: stretch; }
  .cookie-actions { width: 100%; }
  .cookie-actions .button { flex: 1; }
}

@media (max-width: 460px) {
  .main-nav a:nth-child(2) { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .button { width: 100%; }
  .profile-badge { right: 0; }
}