@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --black: #05080D;
  --panel: #0B1118;
  --cyan: #00E5FF;
  --cyan-dark: #00BFFF;
  --white: #F4FAFC;
  --grey: #94A3B8;
  --line: rgba(148, 163, 184, .16);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--white);
  background: var(--black);
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
::selection { background: var(--cyan); color: var(--black); }

.cursor-glow {
  position: fixed; z-index: 20; width: 380px; height: 380px;
  border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(0,229,255,.16) 0, rgba(0,229,255,.08) 18%, rgba(0,191,255,.035) 38%, transparent 68%);
  box-shadow: inset 0 0 90px rgba(0,229,255,.035);
  transform: translate(-50%, -50%);
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity .25s, width .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1);
}

.cursor-glow::before,
.cursor-glow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.cursor-glow::before {
  width: 8px;
  height: 8px;
  background: #eaffff;
  box-shadow:
    0 0 8px #fff,
    0 0 18px var(--cyan),
    0 0 36px rgba(0,229,255,.8);
}

.cursor-glow::after {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(0,229,255,.78);
  box-shadow:
    0 0 16px rgba(0,229,255,.16),
    inset 0 0 12px rgba(0,229,255,.08);
  animation: cursor-orbit 3.2s linear infinite;
  transition: width .25s ease, height .25s ease, border-color .25s ease;
}

.cursor-glow.cursor-hover::after {
  width: 62px;
  height: 62px;
  border-color: rgba(184,251,255,.95);
  border-style: dashed;
}

.cursor-glow.cursor-press::after {
  width: 28px;
  height: 28px;
  background: rgba(0,229,255,.12);
  border-width: 2px;
}

.cursor-glow.cursor-moving::before {
  animation: cursor-pulse .42s ease-out infinite alternate;
}

@keyframes cursor-orbit {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes cursor-pulse {
  to { transform: translate(-50%, -50%) scale(.72); }
}

@media (pointer: fine) {
  body, a, button, [role="button"], input, textarea, select {
    cursor: none;
  }
}

.navbar {
  position: fixed; z-index: 100; top: 0; left: 0; right: 0;
  height: 84px; padding: 0 max(24px, calc((100vw - var(--container)) / 2));
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent; transition: .35s ease;
}
.navbar.scrolled {
  height: 68px;
  background: rgba(5,8,13,.88);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; }
.brand i { width: 7px; height: 7px; border: 1px solid var(--cyan); border-radius: 50%; box-shadow: 0 0 10px var(--cyan); }
.nav-links { display: flex; gap: 34px; margin-left: 80px; }
.nav-links a { color: var(--grey); font-size: 14px; transition: color .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }
.nav-contact { font-size: 14px; border-bottom: 1px solid var(--line); padding: 8px 0; }
.nav-contact span { color: var(--cyan); margin-left: 8px; }
.menu-toggle { display: none; border: 0; background: none; }

.hero {
  position: relative; min-height: 780px; height: 100svh; max-height: 980px;
  display: grid; grid-template-columns: 1.08fr .92fr; align-items: center;
  max-width: 1320px; margin: auto; padding: 110px 70px 60px;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background-image: linear-gradient(rgba(0,229,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(0,229,255,.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to right, transparent, #000 25%, #000 80%, transparent);
}
.eyebrow, .section-index {
  color: var(--cyan); font: 500 11px "DM Mono", monospace;
  letter-spacing: .18em;
}
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.eyebrow span { width: 28px; height: 1px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.hero h1 { margin: 0; max-width: 680px; font-size: clamp(48px, 5.2vw, 78px); line-height: 1.02; letter-spacing: -.055em; }
.hero h1 span, .hero h1 strong { display: block; }
.hero h1 strong { color: transparent; -webkit-text-stroke: 1px rgba(244,250,252,.78); font-weight: 700; }
.hero-lead { max-width: 590px; margin: 28px 0 16px; color: var(--grey); line-height: 1.75; font-size: 20px; }
.hero-lead b { color: var(--white); }
.location { display: flex; align-items: center; gap: 8px; color: var(--grey); font-size: 15px; }
.location svg { width: 15px; fill: none; stroke: var(--cyan); }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.button {
  min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 30px;
  padding: 0 22px; border: 1px solid var(--line); font-size: 14px;
  transition: transform .25s, border-color .25s, background .25s, box-shadow .25s;
}
.button:hover { transform: translateY(-3px); border-color: var(--cyan); }
.button-primary { color: var(--black); background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
.button-primary:hover { box-shadow: 0 10px 35px rgba(0,229,255,.18); }
.button-primary span { font-size: 17px; }
.button-ghost { color: var(--white); background: rgba(11,17,24,.6); }

.hero-visual { position: relative; display: flex; justify-content: flex-end; align-items: center; }
.portrait-frame {
  position: relative; width: min(410px, 34vw); aspect-ratio: 4 / 5;
  border: 1px solid rgba(0,229,255,.22); background: radial-gradient(circle at 50% 70%, rgba(0,229,255,.12), transparent 28%);
  clip-path: polygon(8% 0, 100% 0, 100% 92%, 92% 100%, 0 100%, 0 8%);
}
.portrait-frame picture, .portrait-frame img { width: 100%; height: 100%; display: block; object-fit: cover; }
.portrait-frame picture { position: absolute; inset: 0; z-index: 2; }
.portrait-frame img { filter: contrast(1.05) saturate(.8); }
.portrait-placeholder {
  position: absolute; z-index: 1; inset: 0; display: grid; place-content: center;
  text-align: center; background: linear-gradient(145deg, #101923, #080C12);
}
.portrait-placeholder span { font-size: 110px; font-weight: 800; color: rgba(0,229,255,.12); }
.portrait-placeholder small { font: 10px "DM Mono", monospace; letter-spacing: .12em; color: var(--grey); text-transform: uppercase; }
.portrait-frame:after { content: ""; position: absolute; z-index: 3; inset: 0; border: 1px solid rgba(244,250,252,.08); pointer-events: none; }
.portrait-orbit { position: absolute; z-index: 4; border: 1px solid rgba(0,229,255,.18); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 115%; height: 115%; left: -8%; top: -7%; }
.orbit-two { width: 80%; height: 80%; right: -16%; bottom: -12%; border-style: dashed; animation: spin 18s linear infinite; }
.status-card {
  position: absolute; z-index: 5; left: -46px; bottom: 45px; display: flex; align-items: center; gap: 10px;
  min-width: 150px; padding: 13px 15px; background: rgba(5,8,13,.88); border: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.status-card i { width: 7px; height: 7px; background: #62f5a6; border-radius: 50%; box-shadow: 0 0 12px #62f5a6; }
.status-card div { display: grid; }
.status-card small { font: 8px "DM Mono", monospace; color: var(--grey); letter-spacing: .15em; }
.status-card strong { font-size: 12px; }
.signature { position: absolute; right: -20px; bottom: 1%; font-family: "DM Mono", monospace; font-size: 18px; letter-spacing: .2em; writing-mode: vertical-rl; color: var(--grey); }
.scroll-cue { position: absolute; left: 70px; bottom: 0; color: var(--grey); font: 9px "DM Mono", monospace; letter-spacing: .16em; display:flex; align-items:center; gap:10px; }
.scroll-cue span { width: 1px; height: 34px; background: linear-gradient(var(--cyan), transparent); }

.section { max-width: var(--container); margin: auto; padding: 120px 40px; }
.section-heading h2 { margin: 16px 0 0; font-size: clamp(38px, 5vw, 64px); line-height: 1.06; letter-spacing: -.05em; }
.section-heading h2 span { color: transparent; -webkit-text-stroke: 1px var(--grey); }
.section-index { margin: 0; }
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; border-bottom: 1px solid var(--line); }
.about-content { padding-top: 45px; }
.about-content p { color: var(--grey); line-height: 1.8; font-size: 16px; }
.about-content .about-lead { color: var(--white); font-size: 21px; line-height: 1.5; }
.trait-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 28px; }
.trait-grid span { border-left: 1px solid var(--cyan); padding: 8px 12px; background: linear-gradient(90deg, rgba(0,229,255,.06), transparent); font-size: 13px; }

.skills { max-width: none; border-bottom: 1px solid var(--line); }
.skills .section-heading { max-width: var(--container); margin: auto; }
.skills-grid { max-width: var(--container); margin: 58px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.skill-card { min-height: 360px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: .35s ease; }
.skill-card:hover { background: linear-gradient(145deg, rgba(0,229,255,.08), transparent 70%); transform: translateY(-6px); box-shadow: inset 0 1px var(--cyan); }
.skill-number { color: var(--cyan); font: 16px "DM Mono", monospace; }
.skill-card h3 { margin: 70px 0 24px; font-size: 18px; }
.skill-card ul { list-style: none; padding: 0; margin: 0; }
.skill-card li { color: var(--grey); font-size: 14px; padding: 7px 0; border-bottom: 1px solid rgba(148,163,184,.07); }

.projects { max-width: none; background: #070B10; }
.projects-head { max-width: var(--container); margin: auto; display: flex; justify-content: space-between; align-items: end; }
.projects-head > p { max-width: 310px; color: var(--grey); line-height: 1.7; font-size: 16px; }
.project-grid { max-width: var(--container); margin: 55px auto 0; display: grid; grid-template-columns: 1.25fr .75fr; gap: 18px; }
.project-card { min-width: 0; }
.project-featured { grid-row: span 2; }
.project-open { width: 100%; padding: 0; border: 1px solid var(--line); background: var(--panel); color: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.project-open:hover { border-color: rgba(0,229,255,.5); }
.project-preview { position: relative; height: 220px; overflow: hidden; transition: transform .5s ease; }
.project-featured .project-preview { height: 525px; }
.project-open:hover .project-preview { transform: scale(1.015); }
.arete-preview { display: grid; place-items: center; background: radial-gradient(circle at 50% 55%, #26323A, #11171A 60%, #090C0E); }
.mock-browser { position: absolute; top: 22px; left: 26px; display: flex; gap: 5px; }
.mock-browser span { width: 5px; height: 5px; border-radius: 50%; border: 1px solid #7b858a; }
.mock-logo { z-index: 2; font-family: Georgia, serif; font-size: clamp(48px, 7vw, 76px); letter-spacing: -.08em; }
.mock-logo span { color: #c8a36a; }
.mock-ring { position: absolute; width: 260px; height: 260px; border: 1px solid rgba(200,163,106,.25); border-radius: 50%; box-shadow: 0 0 60px rgba(200,163,106,.08); }
.arete-preview small { position: absolute; bottom: 35px; color: #aab2b5; font: 8px "DM Mono", monospace; letter-spacing: .22em; }
.personal-preview { background: #080B10; }.code-window { position:absolute; width:55%; height:65%; left:22%; top:18%; border:1px solid rgba(0,229,255,.28); background:rgba(11,17,24,.9); display:grid; place-items:center; }.code-window b{color:var(--cyan); font-size:28px}.code-window span{position:absolute;height:1px;background:var(--line);width:45%;left:28%}.code-window span:nth-of-type(1){top:28%}.code-window span:nth-of-type(2){top:35%}.code-window span:nth-of-type(3){top:42%}.personal-grid{position:absolute;inset:0;background-image:linear-gradient(rgba(0,229,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(0,229,255,.05) 1px,transparent 1px);background-size:24px 24px}
.project-meta { height: 94px; display: grid; grid-template-columns: 45px 1fr 30px; align-items: center; padding: 0 22px; }
.project-meta > span { color: var(--cyan); font: 9px "DM Mono", monospace; }
.project-meta p { margin:0 0 5px; color:var(--grey); font-size:11px; text-transform:uppercase; }.project-meta h3{margin:0;font-size:16px}.project-meta i{font-style:normal;color:var(--cyan)}

.workflow { border-bottom: 1px solid var(--line); }
.timeline { margin-top: 55px; border-top: 1px solid var(--line); display:grid; grid-template-columns:repeat(4,1fr); }
.timeline-step {
  position: relative;
  min-height: 210px;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
}

.timeline-step:first-child {
  border-left: 1px solid var(--line);
}

.timeline-step:before {
  content: "";
  position: absolute;
  top: -4px;
  left: 24px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.timeline-step > span {
  font: 16px "DM Mono";
  color: var(--cyan);
}

.timeline-step div {
  margin-top: 85px;
}

.timeline-step h3 {
  margin: 0 0 10px;
}

.timeline-step p {
  margin: 0;
  color: var(--grey);
  font-size: 16px;
  line-height: 1.6;
}
.education-layout { margin-top:55px; display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px }
.education-card { position:relative; min-height:320px; padding:28px; border:1px solid var(--line); background:linear-gradient(145deg,rgba(11,17,24,.8),transparent)}
.education-label{color:var(--cyan);font:9px "DM Mono";letter-spacing:.12em}.education-card h3{margin:55px 0 16px;font-size:20px;line-height:1.35}.education-card p:not(.education-label){color:var(--grey);font-size:14px}.education-card ul{padding:18px 0 0 16px;color:var(--grey);font-size:13px;line-height:1.9}.certificate-mark{position:absolute;right:24px;bottom:20px;color:rgba(0,229,255,.12);font-size:44px;font-weight:800}.certificate-mark span{font-size:14px;border:1px solid var(--cyan);border-radius:50%;padding:4px}

.goals {
  position: relative;
  max-width: none;
  min-height: 620px;
  display: grid;
  grid-template-columns: 54px minmax(300px, 1fr) minmax(320px, .78fr);
  gap: 42px;
  align-items: center;
  padding-left: max(40px, calc((100vw - var(--container)) / 2));
  padding-right: max(40px, calc((100vw - var(--container)) / 2));
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 73% 45%, rgba(0,229,255,.09), transparent 23%),
    linear-gradient(135deg, rgba(9,16,24,.96), #05080D 72%);
}
.goals::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  right: 6%;
  top: 50%;
  border: 1px solid rgba(0,229,255,.09);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 100px rgba(0,229,255,.025), inset 0 0 70px rgba(0,229,255,.025);
}
.goals-line {
  height: 420px;
  position: relative;
  border-left: 1px solid rgba(0,229,255,.38);
}
.goals-line span {
  position: absolute;
  left: -4px;
  top: 18%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 18px var(--cyan);
  animation: status-pulse 2.4s ease-in-out infinite;
}
.goals-line i {
  position: absolute;
  left: -1px;
  bottom: 0;
  width: 170px;
  height: 1px;
  transform: rotate(-45deg);
  transform-origin: left;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.goals-copy,
.goals-text { position: relative; z-index: 2; }
.goals h2 { margin: 18px 0 28px; font-size:clamp(42px,5vw,66px); line-height:1.05; letter-spacing:-.05em; }
.goals h2 span { color:var(--cyan); }
.goals-tags { display:flex; flex-wrap:wrap; gap:8px; }
.goals-tags span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--grey);
  font: 11px "DM Mono", monospace;
  letter-spacing: .08em;
  background: rgba(11,17,24,.7);
}
.goals-text {
  justify-self: end;
  max-width: 520px;
  padding: 38px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(11,17,24,.94), rgba(5,8,13,.72));
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
}
.goals-text p { margin:0; color:var(--grey); line-height:1.8; font-size:18px; }
.goals-text p + p { margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.goals-marker {
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:26px;
  color:var(--cyan);
  font:10px "DM Mono", monospace;
  letter-spacing:.16em;
}
.goals-marker b { width:38px; height:38px; display:grid; place-content:center; border:1px solid rgba(0,229,255,.42); border-radius:50%; }

.contact {
  position:relative;
  max-width:none;
  min-height:620px;
  display:grid;
  grid-template-columns:minmax(360px, 1.35fr) minmax(300px, .65fr);
  gap:80px;
  align-items:center;
  padding-left:max(40px, calc((100vw - var(--container)) / 2));
  padding-right:max(40px, calc((100vw - var(--container)) / 2));
  overflow:hidden;
  background:
    linear-gradient(90deg, rgba(0,229,255,.025) 1px, transparent 1px),
    linear-gradient(rgba(0,229,255,.025) 1px, transparent 1px),
    linear-gradient(135deg,#091018,#05080D);
  background-size:48px 48px,48px 48px,auto;
}
.contact::after {
  content:"";
  position:absolute;
  right:-140px;
  top:-180px;
  width:420px;
  height:420px;
  border:1px solid rgba(0,229,255,.11);
  border-radius:50%;
  box-shadow:0 0 100px rgba(0,229,255,.04);
}
.contact-inner { position:relative; z-index:2; justify-self:start; width:min(650px,100%); }
.contact-inner h2{margin:18px 0;font-size:clamp(54px,7vw,82px);letter-spacing:-.06em}.contact-inner>p:not(.section-index){max-width:480px;color:var(--grey);line-height:1.7;font-size:18px}.contact-button{margin-top:25px}
.contact-details {
  position:relative;
  z-index:2;
  width:100%;
  max-width:360px;
  justify-self:end;
  display:grid;
  border:1px solid var(--line);
  background:rgba(5,8,13,.72);
  backdrop-filter:blur(14px);
  clip-path:polygon(0 24px,24px 0,100% 0,100% calc(100% - 24px),calc(100% - 24px) 100%,0 100%);
}
.contact-details div{position:relative;padding:18px 24px;border-bottom:1px solid var(--line);display:grid}
.contact-details div:last-child{border-bottom:0}
.contact-details small{font:11px "DM Mono";color:var(--cyan);letter-spacing:.14em;margin-bottom:7px}.contact-details a,.contact-details strong{font-size:16px}.contact-details strong span{color:var(--grey);font-weight:400}
.contact-details a { transition:color .25s, transform .25s; }
.contact-details a:hover { color:var(--cyan); transform:translateX(5px); }
.contact-details .contact-signal {
  display:flex;
  grid-auto-flow:column;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:10px;
  padding:12px 24px;
  color:var(--cyan);
  font:10px "DM Mono", monospace;
  letter-spacing:.18em;
}
.contact-signal i { width:8px;height:8px;border-radius:50%;background:#62f5a6;box-shadow:0 0 14px #62f5a6;animation:status-pulse 2.4s ease-in-out infinite }

footer { height:100px; max-width:var(--container); margin:auto; display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--line); color:var(--grey); font-size:12px }.footer-brand{color:var(--white)}footer a:last-child{color:var(--grey)}

.case-modal { width:min(760px,calc(100% - 32px)); padding:0; border:1px solid rgba(0,229,255,.25); background:#0B1118; color:var(--white); box-shadow:0 30px 100px rgba(0,0,0,.7) }.case-modal::backdrop{background:rgba(2,5,8,.82);backdrop-filter:blur(8px)}.modal-close{position:absolute;right:18px;top:14px;width:38px;height:38px;border:1px solid var(--line);background:transparent;color:var(--white);cursor:pointer}.modal-content{padding:55px}.modal-content h2{font-size:48px;margin:12px 0}.modal-description{color:var(--grey);line-height:1.7;font-size:16px}.modal-grid{margin-top:35px;display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line)}.modal-grid div{background:#0B1118;padding:18px}.modal-grid small{color:var(--cyan);font:9px "DM Mono"}.modal-grid p{color:var(--grey);font-size:14px;line-height:1.6}

.reveal { opacity:0; transform:translateY(24px); transition:opacity .75s ease,var(--transform,transform) .75s ease }.reveal.visible{opacity:1;transform:translateY(0)}

@keyframes spin { to { transform:rotate(360deg); } }

@media (max-width: 980px) {
  .navbar { padding:0 24px }.nav-links { position:absolute;top:68px;left:16px;right:16px;margin:0;padding:25px;display:none;flex-direction:column;background:#0B1118;border:1px solid var(--line)}.nav-links.open{display:flex}.nav-contact{display:none}.menu-toggle{display:grid;width:42px;height:42px;place-content:center;gap:6px}.menu-toggle span{display:block;width:22px;height:1px;background:var(--white)}.menu-toggle[aria-expanded="true"] span:first-child{transform:translateY(3.5px) rotate(45deg)}.menu-toggle[aria-expanded="true"] span:last-child{transform:translateY(-3.5px) rotate(-45deg)}
  .hero{grid-template-columns:1fr .65fr;padding-left:24px;padding-right:24px}.hero h1{font-size:54px}.portrait-frame{width:270px}.status-card{left:-25px}.scroll-cue{left:24px}.section{padding:90px 24px}.about{gap:40px}.skills-grid{margin-left:24px;margin-right:24px;grid-template-columns:1fr 1fr}.projects-head,.project-grid{margin-left:24px;margin-right:24px}.project-grid{grid-template-columns:1fr 1fr}.project-featured{grid-row:auto}.project-featured .project-preview{height:220px}.timeline{margin-left:24px;margin-right:24px}.education-layout{grid-template-columns:1fr 1fr}.education-card:last-child{grid-column:span 2}.contact-inner{width:auto;margin-left:24px}.contact-details{margin-right:24px}
}

@media (max-width: 680px) {
  .navbar{height:68px}.hero{height:auto;max-height:none;min-height:760px;grid-template-columns:1fr;padding:130px 20px 70px}.hero-copy{z-index:5}.hero h1{font-size:43px}.hero-lead{font-size:16px}.location{font-size:13px}.hero-visual{position:absolute;right:-85px;top:155px;opacity:.18}.portrait-frame{width:260px}.status-card,.signature{display:none}.scroll-cue{display:none}.hero-actions{flex-direction:column;width:100%;max-width:280px}.button{width:100%}.section{padding:78px 20px}.about{grid-template-columns:1fr;gap:10px}.about-content{padding-top:10px}.trait-grid{grid-template-columns:1fr}.skills .section-heading{margin:0}.skills-grid{grid-template-columns:1fr;margin:45px 20px 0}.skill-card{min-height:300px}.skill-card h3{margin-top:45px}.projects-head{display:block;margin:0}.projects-head>p{margin-top:22px}.project-grid{grid-template-columns:1fr;margin:40px 0 0}.project-preview,.project-featured .project-preview{height:260px}.timeline{grid-template-columns:1fr;margin:45px 0 0}.timeline-step{min-height:150px;border-left:1px solid var(--line)}.timeline-step div{margin-top:45px}.education-layout{grid-template-columns:1fr}.education-card:last-child{grid-column:auto}.goals{grid-template-columns:1fr;padding:78px 20px}.goals-text{justify-self:start}.contact{grid-template-columns:1fr;gap:50px;padding:78px 20px}.contact-inner{margin:0}.contact-inner h2{font-size:58px}.contact-details{width:100%;margin:0}.modal-content{padding:50px 22px 28px}.modal-content h2{font-size:36px}.modal-grid{grid-template-columns:1fr}footer{margin:0 20px}
}

@media (max-width: 980px) {
  .goals {
    min-height: 560px;
    grid-template-columns: 34px minmax(0, 1fr) minmax(280px, .82fr);
    gap: 24px;
  }
  .goals-text { padding: 28px; }
  .goals::before { right: -20%; }
  .contact { gap: 38px; }
}

@media (max-width: 680px) {
  .goals {
    min-height: 0;
    grid-template-columns: 24px 1fr;
    gap: 18px;
  }
  .goals-line { height: 100%; min-height: 280px; }
  .goals-copy { grid-column: 2; }
  .goals-text {
    grid-column: 2;
    justify-self: stretch;
    max-width: none;
    width: 100%;
    padding: 24px;
  }
  .goals h2 { font-size: 42px; }
  .goals::before { width: 360px; height: 360px; right: -220px; }
  .contact {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 42px;
  }
  .contact-inner { width: 100%; }
  .contact-details { justify-self: start; max-width: none; }
  .contact-inner h2 { font-size: 58px; }
  .contact::after { width: 300px; height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto }.reveal{opacity:1;transform:none;transition:none}.orbit-two{animation:none}.cursor-glow{display:none}*{scroll-behavior:auto!important}
}

/* Layered motion and interactive light treatment */
:root {
  --scroll-progress: 0;
  --pointer-x: 50%;
  --pointer-y: 50%;
}

body::before {
  content: "";
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--cyan-dark), var(--cyan), #b8fbff);
  box-shadow: 0 0 12px rgba(0, 229, 255, .75);
  transform: scaleX(var(--scroll-progress));
  transform-origin: left center;
}

.hero-grid {
  animation: grid-drift 32s linear infinite;
}

.hero-grid::after {
  content: "";
  position: absolute;
  inset: -20% 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 229, 255, .08) 50%, transparent 65%);
  transform: translateY(-100%);
  animation: grid-scan 9s ease-in-out infinite;
}

.hero-copy .eyebrow,
.hero-copy h1,
.hero-copy .hero-lead,
.hero-copy .location,
.hero-copy .hero-actions {
  animation: hero-arrive .9s cubic-bezier(.2,.8,.2,1) both;
}
.hero-copy h1 { animation-delay: .12s; }
.hero-copy .hero-lead { animation-delay: .22s; }
.hero-copy .location { animation-delay: .3s; }
.hero-copy .hero-actions { animation-delay: .38s; }
.hero h1 strong {
  background: linear-gradient(100deg, #f4fafc 10%, var(--cyan) 48%, #f4fafc 85%);
  background-size: 220% 100%;
  background-position: 100% 50%;
  background-clip: text;
  -webkit-background-clip: text;
  animation: title-glint 7s ease-in-out 1s infinite;
}

.portrait-frame {
  isolation: isolate;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, .05), 0 35px 100px rgba(0, 229, 255, .07);
  animation: portrait-float 7s ease-in-out infinite;
}
.portrait-frame::before {
  content: "";
  position: absolute;
  z-index: 4;
  inset: -1px;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 20%, rgba(0, 229, 255, .45) 48%, transparent 72%);
  background-size: 220% 100%;
  mix-blend-mode: screen;
  animation: frame-shimmer 6s ease-in-out infinite;
}
.portrait-frame img { transition: transform 1.1s cubic-bezier(.2,.8,.2,1), filter .8s ease; }
.portrait-frame:hover img { transform: scale(1.045); filter: contrast(1.08) saturate(1); }
.orbit-one { animation: orbit-breathe 8s ease-in-out infinite; }
.orbit-two { box-shadow: 0 0 22px rgba(0, 229, 255, .08); }
.status-card { animation: status-float 5s ease-in-out infinite; }
.status-card i { animation: status-pulse 2.4s ease-in-out infinite; }
.scroll-cue span { animation: cue-flow 1.8s ease-in-out infinite; }
.cursor-glow {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(0,229,255,.1), rgba(0,191,255,.035) 32%, transparent 70%);
  mix-blend-mode: screen;
  transition: opacity .35s ease;
}

.reveal {
  filter: blur(7px);
  transition: opacity .9s cubic-bezier(.2,.75,.2,1),
    transform .9s cubic-bezier(.2,.75,.2,1),
    filter .9s cubic-bezier(.2,.75,.2,1);
}
.reveal.visible { filter: blur(0); }
.hero-copy.reveal { transform: translate3d(-18px, 16px, 0); }
.hero-copy.reveal.visible { transform: translate3d(0, 0, 0); }
.hero-visual.reveal { transform: translate3d(18px, 12px, 0) scale(.97); }
.hero-visual.reveal.visible { transform: translate3d(0, 0, 0) scale(1); }

.section-heading h2,
.goals h2,
.contact-inner h2 {
  text-wrap: balance;
}
.section-heading h2 span {
  transition: color .6s ease, text-shadow .6s ease, -webkit-text-stroke-color .6s ease;
}
.section-heading:hover h2 span {
  color: rgba(0, 229, 255, .7);
  -webkit-text-stroke-color: var(--cyan);
  text-shadow: 0 0 30px rgba(0, 229, 255, .18);
}
.section-index { transition: letter-spacing .4s ease, text-shadow .4s ease; }
.section-heading:hover .section-index { letter-spacing: .26em; text-shadow: 0 0 14px rgba(0, 229, 255, .5); }

.skill-card,
.education-card,
.project-open {
  position: relative;
  isolation: isolate;
  transform-style: preserve-3d;
  will-change: transform;
}
.skill-card::before,
.education-card::before,
.project-open::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(360px circle at var(--pointer-x) var(--pointer-y), rgba(0,229,255,.12), transparent 68%);
  transition: opacity .35s ease;
}
.skill-card:hover::before,
.education-card:hover::before,
.project-open:hover::before { opacity: 1; }
.skill-card > *,
.education-card > *,
.project-open > * { position: relative; z-index: 1; }
.skill-card { transition: border-color .45s ease, box-shadow .45s ease, background .45s ease; }
.skill-card li {
  opacity: .76;
  transform: translateX(0);
  transition: color .25s ease, opacity .3s ease, transform .35s cubic-bezier(.2,.8,.2,1);
}
.skill-card:hover li { opacity: 1; transform: translateX(5px); }
.skill-card:hover li:nth-child(2) { transition-delay: 25ms; }
.skill-card:hover li:nth-child(3) { transition-delay: 50ms; }
.skill-card:hover li:nth-child(4) { transition-delay: 75ms; }
.skill-card:hover li:nth-child(5) { transition-delay: 100ms; }
.skill-card:hover li:nth-child(6) { transition-delay: 125ms; }
.skill-card li::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 1px;
  margin: 0;
  vertical-align: middle;
  background: var(--cyan);
  transition: width .3s ease, margin .3s ease;
}
.skill-card li:hover::before { width: 10px; margin-right: 7px; }

.project-open {
  transition: border-color .5s ease, box-shadow .5s ease, transform .5s cubic-bezier(.2,.8,.2,1);
}
.project-open:hover {
  box-shadow: 0 20px 70px rgba(0, 0, 0, .35), 0 0 30px rgba(0, 229, 255, .08);
}
.project-preview::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: -40% -70%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(110deg, transparent 42%, rgba(255,255,255,.16) 50%, transparent 58%);
  transform: translateX(-45%) rotate(8deg);
  transition: opacity .3s ease, transform .9s cubic-bezier(.2,.7,.2,1);
}
.project-open:hover .project-preview::after { opacity: 1; transform: translateX(45%) rotate(8deg); }
.mock-ring { animation: ring-breathe 5s ease-in-out infinite; }
.personal-grid { animation: grid-drift 18s linear infinite; }
.project-meta i { transition: transform .35s ease, text-shadow .35s ease; }
.project-open:hover .project-meta i { transform: translate(4px, -4px); text-shadow: 0 0 12px var(--cyan); }

.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.5s cubic-bezier(.2,.8,.2,1);
}
.timeline:has(.timeline-step.visible)::before { transform: scaleX(1); }
.timeline-step:before { transition: transform .4s ease, box-shadow .4s ease; }
.timeline-step:hover:before { transform: scale(1.8); box-shadow: 0 0 20px var(--cyan); }
.timeline-step h3 { transition: color .3s ease, transform .3s ease; }
.timeline-step:hover h3 { color: var(--cyan); transform: translateX(4px); }

.education-card {
  overflow: hidden;
  transition: transform .5s cubic-bezier(.2,.8,.2,1), border-color .4s ease, box-shadow .4s ease;
}
.education-card::after {
  content: "";
  position: absolute;
  top: -120%;
  left: -40%;
  width: 45%;
  height: 340%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(0,229,255,.07), transparent);
  transform: rotate(25deg);
  transition: left .9s ease, opacity .3s ease;
}
.education-card:hover { transform: translateY(-7px); border-color: rgba(0,229,255,.4); box-shadow: 0 18px 50px rgba(0,0,0,.24); }
.education-card:hover::after { left: 120%; opacity: 1; }
.certificate-mark { transition: color .5s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.education-card:hover .certificate-mark { color: rgba(0,229,255,.3); transform: rotate(-8deg) scale(1.08); }

.goals { background-size: 140% 140%; animation: ambient-shift 12s ease-in-out infinite alternate; }
.goals h2 span { display: inline-block; transition: text-shadow .4s ease, transform .4s ease; }
.goals-copy:hover h2 span { text-shadow: 0 0 30px rgba(0,229,255,.4); transform: translateX(5px); }
.contact-inner h2 { background: linear-gradient(90deg, var(--white), var(--cyan), var(--white)); background-size: 220% 100%; background-clip: text; -webkit-background-clip: text; transition: color .3s ease; }
.contact-inner:hover h2 { color: transparent; animation: title-glint 4s ease-in-out infinite; }

.button { position: relative; overflow: hidden; isolation: isolate; }
.button::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
}
.button:hover::before { transform: translateX(120%); }
.button span { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.button:hover span { transform: translate(3px, -2px); }
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  transition: right .35s cubic-bezier(.2,.8,.2,1);
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-contact span { display: inline-block; transition: transform .3s ease; }
.nav-contact:hover span { transform: translate(3px, -3px); }
.brand span { transition: color .3s ease, text-shadow .3s ease; }
.brand:hover span { color: var(--cyan); text-shadow: 0 0 16px rgba(0,229,255,.5); }

.case-modal[open] { animation: modal-enter .45s cubic-bezier(.16,1,.3,1) both; }
.case-modal[open]::backdrop { animation: backdrop-enter .35s ease both; }
.modal-close { transition: color .25s ease, border-color .25s ease, transform .3s ease; }
.modal-close:hover { color: var(--cyan); border-color: var(--cyan); transform: rotate(90deg); }

@keyframes hero-arrive {
  from { opacity: 0; filter: blur(12px); transform: translateY(18px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes title-glint {
  0%, 20% { background-position: 100% 50%; }
  60%, 100% { background-position: 0 50%; }
}
@keyframes portrait-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes frame-shimmer { 0%, 15% { background-position: 120% 50%; opacity: .15; } 55%, 100% { background-position: -120% 50%; opacity: .55; } }
@keyframes orbit-breathe { 0%, 100% { transform: scale(1); opacity: .55; } 50% { transform: scale(1.035); opacity: .95; } }
@keyframes status-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes status-pulse { 0%, 100% { box-shadow: 0 0 7px #62f5a6; } 50% { box-shadow: 0 0 18px #62f5a6; } }
@keyframes cue-flow { 0%, 100% { opacity: .45; transform: scaleY(.65); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }
@keyframes grid-drift { to { background-position: 72px 72px; } }
@keyframes grid-scan { 0%, 20% { transform: translateY(-100%); } 80%, 100% { transform: translateY(100%); } }
@keyframes ring-breathe { 0%, 100% { transform: scale(.92); opacity: .35; } 50% { transform: scale(1.08); opacity: .8; } }
@keyframes ambient-shift { from { background-position: 0% 40%; } to { background-position: 100% 60%; } }
@keyframes modal-enter { from { opacity: 0; transform: translateY(24px) scale(.97); filter: blur(5px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 680px) {
  .cursor-glow { display: none; }
  .portrait-frame { animation-duration: 9s; }
  .project-open:hover { transform: none !important; }
  .education-card:hover { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
  .hero-grid, .hero-grid::after, .hero-copy .eyebrow, .hero-copy h1,
  .hero-copy .hero-lead, .hero-copy .location, .hero-copy .hero-actions,
  .hero h1 strong, .portrait-frame, .portrait-frame::before, .portrait-frame img,
  .orbit-one, .orbit-two, .status-card, .status-card i, .scroll-cue span,
  .personal-grid, .mock-ring, .goals, .contact-inner:hover h2 {
    animation: none !important;
  }
  .reveal, .hero-copy.reveal, .hero-visual.reveal {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
  .button, .button::before, .skill-card, .education-card, .project-open,
  .project-preview::after, .project-meta i, .nav-links a::after {
    transition: none !important;
  }
}

/* Leggibilita dei contenuti testuali: i titoli h1-h3 restano alle dimensioni originali. */
.brand,
.nav-links a,
.nav-contact,
.button,
.hero-lead,
.location,
.status-card strong,
.signature,
.scroll-cue,
.about-content p,
.trait-grid span,
.skill-card li,
.projects-head > p,
.project-meta p,
.timeline-step p,
.education-label,
.education-card p:not(.education-label),
.education-card ul,
.goals-text p,
.contact-inner > p:not(.section-index),
.contact-details a,
.contact-details strong,
footer,
.modal-description,
.modal-grid p {
  font-size: 16px;
}

.brand { font-size: 22px; }
.nav-links a,
.nav-contact { font-size: 16px; }
.hero-lead { font-size: 22px; }
.location { font-size: 17px; }
.button { font-size: 16px; }
.status-card strong { font-size: 14px; }
.signature { font-size: 20px; }
.scroll-cue { font-size: 11px; }
.about-content p { font-size: 18px; }
.about-content .about-lead { font-size: 24px; }
.trait-grid span { font-size: 15px; }
.skill-card li { font-size: 16px; }
.projects-head > p { font-size: 18px; }
.project-meta p { font-size: 13px; }
.timeline-step p { font-size: 16px; }
.education-label { font-size: 11px; }
.education-card p:not(.education-label) { font-size: 16px; }
.education-card ul { font-size: 15px; }
.goals-text p { font-size: 18px; }
.contact-inner > p:not(.section-index) { font-size: 18px; }
.contact-details a,
.contact-details strong { font-size: 16px; }
footer { font-size: 14px; }
.modal-description { font-size: 18px; }
.modal-grid p { font-size: 16px; }

.eyebrow,
.section-index,
.status-card small,
.portrait-placeholder small,
.arete-preview small,
.project-meta > span,
.contact-details small,
.modal-grid small {
  font-size: 12px;
}

.timeline-step > span {
  font-size: 16px;
}

@media (max-width: 980px) {
  .hero-lead { font-size: 22px; }
  .about-content p { font-size: 18px; }
  .contact-inner > p:not(.section-index) { font-size: 18px; }
}

@media (max-width: 680px) {
  .hero-lead { font-size: 18px; }
  .location { font-size: 15px; }
  .about-content p { font-size: 17px; }
  .projects-head > p { font-size: 17px; }
  .goals-text p { font-size: 17px; }
  .contact-inner > p:not(.section-index) { font-size: 17px; }
}