.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 200; }
.skip:focus { left: 8px; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--page) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; font-size: 14px; letter-spacing: .02em; }
.nav { display: flex; gap: 2px; margin: 0 auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.active { color: var(--accent); background: var(--accent-soft); }
.bar-actions { display: flex; gap: 8px; align-items: center; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.menu-btn { display: none; }

/* hero */
.hero { background: var(--hero-grad); padding: 56px 0 40px; scroll-margin-top: 68px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--good); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; box-shadow: var(--shadow); }
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 20%, transparent); }
.hello { margin: 24px 0 0; font-size: 18px; color: var(--ink-2); font-weight: 500; }
.hero h1 { margin: 2px 0 6px; font-size: clamp(42px, 6vw, 66px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; }
.role { margin: 0; font-size: clamp(19px, 2.2vw, 24px); font-weight: 600; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro { font-size: 18px; color: var(--ink-2); max-width: 580px; margin: 18px 0 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-links a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.hero-links a:hover { color: var(--accent); border-color: var(--accent); }
.hero-links svg { width: 16px; height: 16px; }

.hero-photo { position: relative; justify-self: center; width: min(420px, 100%); }
.photo-frame { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--page-2); box-shadow: var(--shadow-lg); border: 6px solid var(--surface); }
/* landscape photo: full height is shown so nothing is cut at the bottom; horizontally centred on the face */
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 51% 50%; }
.float { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); line-height: 1.3; }
.float b { display: block; font-size: 14px; } .float span { font-size: 12.5px; color: var(--muted); }
/* floating data terms behind the portrait */
.data-field { position: absolute; inset: -80px -170px -60px; z-index: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 62% 62% at 50% 50%, #000 55%, transparent 100%); }
.data-field::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in srgb, var(--accent) 34%, transparent) 1.2px, transparent 1.3px); background-size: 22px 22px; opacity: .55; }
.data-field::after { content: ""; position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%); }
.dt { position: absolute; z-index: 1; white-space: nowrap; font: 600 12.5px/1 var(--mono); color: var(--accent); opacity: .5; will-change: transform, opacity; }
.dt.chip { padding: 6px 9px; border-radius: 8px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); opacity: .75; color: var(--ink-2); }
.dt.chip em { font-style: normal; color: var(--accent); }
.dt.big { font-size: 22px; font-weight: 700; opacity: .22; }
.dt.alt { color: var(--accent-2); }
.dt.bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; opacity: .55; }
.dt.bars i { width: 6px; border-radius: 2px 2px 0 0; background: var(--accent); transform-origin: bottom; }
.dt.bars i:nth-child(even) { background: var(--accent-2); }
.dt.spark svg { width: 86px; height: 30px; display: block; overflow: visible; }
.hero-photo > .photo-frame, .hero-photo > .float { z-index: 2; }
.f1 { left: -28px; top: 18%; } .f2 { right: -24px; bottom: 12%; } .f3 { left: -36px; bottom: 30%; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 32px; letter-spacing: -0.02em; color: var(--accent); }
.stat span { font-size: 14px; color: var(--ink-2); }

/* sections */
.section { padding: 80px 0; scroll-margin-top: 68px; }
.section.alt { background: var(--page-2); }
.head { max-width: 680px; margin-bottom: 36px; }
.head.center { text-align: center; margin-inline: auto; }
.kicker { margin: 0 0 8px; font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.section h2 { margin: 0 0 10px; font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.025em; line-height: 1.15; }
.head p { margin: 0; color: var(--ink-2); font-size: 17px; }

/* services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.service:hover { transform: translateY(-3px); border-color: var(--accent); }
.service .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.service .ico svg { width: 24px; height: 24px; }
.service h3 { margin: 0 0 6px; font-size: 18px; }
.service p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* about */
.about { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.about-photo { position: sticky; top: 96px; border-radius: 24px; overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow-lg); border: 6px solid var(--surface); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 51% 45%; }
#about-text p { color: var(--ink-2); margin: 0 0 12px; }
#about-text p:first-child { font-size: 18px; color: var(--ink); }
#about-text .offline { color: var(--muted); font-size: 15px; }
#about-text .venture a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.skill-group { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.skill-group h4 { margin: 0 0 8px; font-size: 14px; }
.skill { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13.5px; margin-bottom: 8px; }
.skill em { font-style: normal; color: var(--muted); font-size: 12px; }
.skill .track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--page-2); overflow: hidden; }
.skill .track i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* portfolio */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.filters button { font: 600 15px var(--sans); padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.filters button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filters button span { opacity: .7; font-weight: 500; margin-left: 6px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.item { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; transition: transform .2s, box-shadow .2s; }
.item:hover, .item:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.item .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--page-2); }
.item .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .4s; }
.item:hover .thumb img { transform: scale(1.04); }
.item .cap { padding: 14px 16px 16px; }
.item .cap span { font-size: 12.5px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.item .cap h3 { margin: 4px 0 0; font-size: 17px; line-height: 1.3; }
/* hover overlay with the project details */
.item .over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 20px;
  background: linear-gradient(180deg, rgba(10, 18, 30, 0.35) 0%, rgba(10, 18, 30, 0.94) 40%, #0A121E 62%, #0A121E 100%);
  color: #fff; opacity: 0; transition: opacity .25s; }
.item:hover .over, .item:focus-visible .over { opacity: 1; }
.over h3 { margin: 0; font-size: 18px; }
.over p { margin: 0; font-size: 13.5px; line-height: 1.5; color: #D9E2EE; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.over .vis { font-size: 12.5px; color: #B6C6DA; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.over .vis b { color: #fff; font-weight: 600; }
.over .tags { display: flex; flex-wrap: wrap; gap: 6px; max-height: 24px; overflow: hidden; }
.over .tags span { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.14); }
.over .open { margin-top: 4px; font-size: 13.5px; font-weight: 600; color: #8EC2FF; }
.note { text-align: center; color: var(--muted); font-size: 14px; margin: 26px 0 0; }

/* experience */
.timeline { position: relative; max-width: 900px; margin: 0 auto; padding-left: 34px; }
.tl-line { position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), var(--accent-2)); transform-origin: top; border-radius: 2px; }
.job { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 18px; }
.job::before { content: ""; position: absolute; left: -30px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.job.current::before { background: var(--accent); }
.job-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.job h3 { margin: 0; font-size: 19px; }
.job .co { color: var(--accent); font-weight: 600; }
.job .when { font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.job .place { font-size: 14px; color: var(--muted); margin-top: 2px; }
.job ul { margin: 10px 0 12px; padding-left: 20px; color: var(--ink-2); }
.job li { margin: 4px 0; }
.job .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.edu { max-width: 900px; margin: 30px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.edu .card { padding: 20px 22px; }
.edu h3 { margin: 0 0 10px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.edu h3 svg { width: 20px; height: 20px; color: var(--accent); }
.edu p { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; }
.edu b { color: var(--ink); }

/* contact */
.contact { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; padding: 40px; align-items: center; background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%); }
.contact p { color: var(--ink-2); margin: 0 0 22px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li a, .contact-list li div { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.contact-list li a:hover { border-color: var(--accent); }
.contact-list .ci { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.contact-list .ci svg { width: 18px; height: 18px; }
.contact-list small { display: block; font-size: 12px; color: var(--muted); }
.contact-list b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* viewer */
.viewer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.viewer[hidden] { display: none; }
.viewer-backdrop { position: absolute; inset: 0; background: rgba(8, 14, 24, 0.78); backdrop-filter: blur(4px); }
.viewer-box { position: relative; width: min(1340px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); display: grid; grid-template-columns: 1fr 340px; background: var(--surface); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.v-img { background: #0E141C; display: grid; place-items: center; min-height: 0; overflow: auto; }
.v-img img { width: 100%; height: auto; }
.v-info { padding: 24px 22px; overflow-y: auto; }
.v-info h3 { margin: 10px 0 6px; font-size: 21px; line-height: 1.25; padding-right: 40px; }
.v-info p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.v-info h4 { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.v-list { margin: 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.v-list li { margin: 3px 0; }
.v-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.v-nav { display: flex; gap: 8px; margin-top: 22px; }
.v-nav .btn { flex: 1; padding: 10px; font-size: 14px; }
.v-close { position: absolute; top: 12px; right: 12px; z-index: 2; }

@media (max-width: 1080px) {
  .gallery, .services { grid-template-columns: repeat(2, 1fr); }
  .viewer-box { grid-template-columns: 1fr; overflow-y: auto; }
  .v-info { max-height: none; }
}
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px; box-shadow: var(--shadow); }
  .nav a { padding: 12px; font-size: 16px; }
  .nav.open { display: flex; }
  .menu-btn { display: inline-grid; }
  .bar-actions { margin-left: auto; }
  .hero-grid, .about { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { order: -1; width: min(320px, 80%); }
  .f1 { left: -10px; } .f2 { right: -10px; }
  .data-field { inset: -40px -60px -30px; } .dt.hide-sm { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .about-photo { position: static; max-width: 320px; margin-inline: auto; }
  .section { padding: 68px 0; }
  .contact { grid-template-columns: 1fr; padding: 26px; }
  .edu { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gallery, .services { grid-template-columns: 1fr; }
  .resume-btn { display: none; }
  .section { padding: 56px 0; }
  .head { margin-bottom: 28px; }
  .hero { padding: 36px 0 32px; }
  .intro { font-size: 17px; }
  .stats { gap: 12px; margin-top: 36px; }
  .stat { padding: 16px; }
  .stat b { font-size: 28px; }
  .contact { padding: 22px 18px; }
  .job { padding: 18px 16px; }
  .viewer { padding: 0; }
  .viewer-box { max-height: 100vh; max-height: 100dvh; border-radius: 0; }
}
/* bigger tap targets on touch screens */
@media (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; }
  .hero-links a { padding: 10px 14px; }
}

/* touch screens have no hover: show a short description under each card instead of the overlay */
@media (hover: none) {
  .item .over { position: static; opacity: 1; background: none; color: var(--ink); padding: 0 16px 16px; }
  .item .over h3, .item .over .vis, .item .over .tags { display: none; }
  .item .over p { color: var(--ink-2); }
  .item .over .open { color: var(--accent); }
}

/* scroll progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: left; transform: scaleX(0); }

/* community & recognition */
.community { max-width: 900px; margin: 18px auto 0; }
.community .card { padding: 20px 22px; }
.community h3 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.community h3 svg { width: 20px; height: 20px; color: var(--accent); }
.comm { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comm-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.comm-item b { color: var(--ink); }
.comm-item small { color: var(--muted); font-size: 13px; }
.trophy { font-size: 22px; line-height: 1; }
@media (max-width: 700px) { .comm { grid-template-columns: 1fr; } .f3 { display: none; } }

/* depth for the GSAP tilt on portfolio cards */
.gallery { perspective: 1200px; }
.item { transform-style: preserve-3d; will-change: transform; }
.js-motion .item:hover { transform: none; }
.btn-primary { will-change: transform; }
