:root {
  color-scheme: dark;
  --background: #050505;
  --surface: #111111;
  --surface-raised: #171717;
  --text: #f5f3ed;
  --muted: #b9b6ae;
  --accent: #f6b73c;
  --accent-dark: #2a1d07;
  --border: #2d2d2d;
  --content-width: 1200px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-scale {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes portrait-float {
  0%, 100% { transform: translateY(0) rotate(.001deg); }
  50% { transform: translateY(-10px) rotate(.001deg); }
}
@keyframes glow-breathe {
  0%, 100% { opacity: .65; transform: scale(.96); }
  50% { opacity: 1; transform: scale(1.04); }
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 3px; }
.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 100;
  padding: .65rem 1rem; background: var(--accent); color: #111;
  font-weight: 800; transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.container { width: min(calc(100% - 2.5rem), var(--content-width)); margin-inline: auto; }
.site-header { position: relative; z-index: 10; border-bottom: 1px solid var(--border); background: rgba(5, 5, 5, .96); animation: reveal-up .55s cubic-bezier(.2,.7,.2,1) both; }
.nav { min-height: 72px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-block: .65rem; }
.logo { color: var(--text); font-size: 1.2rem; font-weight: 850; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; transition: color .2s ease, letter-spacing .25s ease; }
.logo:hover { letter-spacing: .13em; }
.nav-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.nav-list a { position: relative; color: var(--muted); font-weight: 650; text-decoration: none; transition: color .2s ease; }
.nav-list a::after { content: ""; position: absolute; right: 0; bottom: -.3rem; left: 0; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .25s cubic-bezier(.2,.7,.2,1); }
.nav-list a:hover::after, .nav-list a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-list a[aria-current="page"], .nav-list a:hover { color: var(--accent); }
.language-list { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; padding: 0; list-style: none; font-size: .78rem; }
.language-list a { display: block; padding: .25rem .55rem; border: 1px solid transparent; border-radius: 999px; color: var(--muted); text-decoration: none; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease; }
.language-list a[aria-current="true"] { border-color: var(--accent); color: var(--accent); font-weight: 750; }
.language-list a:hover { color: var(--text); background: var(--surface-raised); transform: translateY(-1px); }
main { overflow: hidden; }
.hero { position: relative; min-height: calc(100svh - 73px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(3rem, 8vh, 6rem); }
.hero-copy > * { animation: reveal-up .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > :nth-child(1) { animation-delay: .08s; }
.hero-copy > :nth-child(2) { animation-delay: .16s; }
.hero-copy > :nth-child(3) { animation-delay: .24s; }
.hero-copy > :nth-child(4) { animation-delay: .32s; }
.hero-copy > :nth-child(5) { animation-delay: .4s; }
.hero-copy > :nth-child(6) { animation-delay: .48s; }
.eyebrow { margin: 0 0 .8rem; color: var(--accent); font-size: .78rem; font-weight: 850; letter-spacing: .19em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; text-wrap: balance; }
h1 { margin-bottom: 1rem; font-size: clamp(2.7rem, 7vw, 5.8rem); letter-spacing: -.055em; }
.accent { color: var(--accent); }
.role { margin: 0 0 1rem; color: var(--text); font-size: clamp(1.25rem, 2.5vw, 1.8rem); font-weight: 700; }
.summary { max-width: 42rem; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.22rem); }
.meta { margin: 1rem 0 0; color: var(--muted); font-size: .96rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .65rem 1.1rem; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-weight: 750; text-decoration: none; transition: transform .2s cubic-bezier(.2,.7,.2,1), border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #151005; }
.button:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--text); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.button:active { transform: translateY(-1px) scale(.98); }
.button.primary:hover { color: #151005; background: #ffd06c; box-shadow: 0 10px 32px rgba(246,183,60,.2); }
.portrait-frame { position: relative; isolation: isolate; animation: reveal-scale .9s .22s cubic-bezier(.2,.7,.2,1) both, portrait-float 7s 1.2s ease-in-out infinite; }
.portrait-frame::before { content: ""; position: absolute; inset: 12% -8% -4% 12%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(246,183,60,.19), transparent 65%); filter: blur(12px); animation: glow-breathe 5s 1s ease-in-out infinite; }
.portrait { width: 100%; height: auto; max-height: 72vh; object-fit: cover; object-position: center top; border-radius: 42% 42% 12% 12%; mask-image: linear-gradient(to bottom, #000 78%, transparent 100%); }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); border-top: 1px solid var(--border); }
.section-heading { max-width: 48rem; margin-bottom: 2.25rem; }
.section h2 { margin-bottom: .7rem; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.035em; }
.section-intro { margin: 0; color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { position: relative; overflow: hidden; padding: clamp(1.35rem, 3vw, 2rem); border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, var(--surface-raised), var(--surface)); transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .3s ease; }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, transparent 25%, rgba(246,183,60,.08), transparent 70%); transform: translateX(-110%); transition: transform .65s cubic-bezier(.2,.7,.2,1); }
.card:hover { transform: translateY(-6px); border-color: rgba(246,183,60,.55); box-shadow: 0 18px 45px rgba(0,0,0,.3); }
.card:hover::before { transform: translateX(110%); }
.card h3 { margin-bottom: .8rem; font-size: 1.35rem; }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.tech { color: var(--accent) !important; font-size: .9rem; font-weight: 700; }
.text-link { color: var(--text); font-weight: 750; }
.text-link::after { content: " →"; display: inline-block; color: var(--accent); transition: transform .2s ease; }
.text-link:hover::after { transform: translateX(.3rem); }
.about-panel, .contact-panel { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.about-panel p, .contact-panel p { margin-top: 0; color: var(--muted); font-size: 1.1rem; }
.contact-panel { padding: clamp(2rem, 5vw, 4rem); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.page-hero { max-width: 850px; padding-block: clamp(4.5rem, 11vw, 8rem); }
.page-hero > * { animation: reveal-up .7s cubic-bezier(.2,.7,.2,1) both; }
.page-hero > :nth-child(2) { animation-delay: .1s; }
.page-hero > :nth-child(3) { animation-delay: .2s; }
.page-hero > :nth-child(4) { animation-delay: .3s; }
.page-hero h1 { font-size: clamp(2.8rem, 8vw, 5.4rem); }
.projects-list { display: grid; gap: 1.25rem; padding-bottom: clamp(5rem, 10vw, 9rem); }
.project { padding: clamp(1.5rem, 5vw, 3.2rem); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); animation: reveal-up .7s cubic-bezier(.2,.7,.2,1) both; transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s ease, box-shadow .3s ease; }
.project:nth-child(2) { animation-delay: .1s; }
.project:nth-child(3) { animation-delay: .2s; }
.project:hover { transform: translateY(-5px); border-color: rgba(246,183,60,.5); box-shadow: 0 18px 45px rgba(0,0,0,.25); }
.project h2 { font-size: clamp(1.65rem, 4vw, 2.5rem); }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.label { display: block; margin-bottom: .35rem; color: var(--accent); font-size: .76rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.project-grid p { margin: 0; color: var(--muted); }
.bio { max-width: 760px; padding-bottom: clamp(5rem, 12vw, 9rem); animation: reveal-up .75s .18s cubic-bezier(.2,.7,.2,1) both; }
.bio h2 { margin-top: 3rem; font-size: 1.7rem; }
.bio p, .bio li { color: var(--muted); font-size: 1.08rem; }
.site-footer { padding-block: 2rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; }
.footer-inner p { margin: 0; }

@media (max-width: 800px) {
  .hero { min-height: auto; grid-template-columns: 1fr; }
  .hero-copy { order: 1; }
  .portrait-frame { order: 2; width: min(100%, 520px); margin-inline: auto; }
  .portrait { max-height: none; }
  .card-grid, .project-grid { grid-template-columns: 1fr; }
  .about-panel, .contact-panel { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 560px) {
  .container { width: min(calc(100% - 1.5rem), var(--content-width)); }
  .nav { align-items: flex-start; flex-direction: column; padding-block: .9rem; }
  .nav-list { justify-content: flex-start; gap: .35rem 1rem; font-size: .9rem; }
  .language-list { width: 100%; }
  .hero { padding-top: 2.75rem; }
  h1 { font-size: clamp(2.45rem, 14vw, 4rem); }
  .button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
