/* ===== Tokens: black, silver and white ===== */
:root {
  --ink: #08090b;
  --graphite: #101114;
  --panel: #15161a;
  --panel-2: #1b1d22;
  --line: rgba(201, 204, 209, 0.14);
  --line-strong: rgba(201, 204, 209, 0.28);
  --silver: #c9ccd1;
  --mist: #8d929b;
  --white: #f4f5f7;
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--silver); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--silver); color: var(--ink); }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* ===== Scroll progress ===== */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--mist), var(--white));
  transform-origin: left; transform: scaleX(0); z-index: 120;
}

/* ===== Navigation ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding-inline: max(1.25rem, calc((100% - 1120px) / 2));
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(145deg, #eceef1, #8f949c);
  color: var(--ink); font-weight: 800; font-size: 1.05rem; letter-spacing: 0;
  transition: transform 0.5s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(90deg); }
.logo-text { font-size: 0.95rem; }

.menu { display: flex; gap: 0.35rem; margin-left: auto; }
.menu a {
  position: relative; padding: 0.5rem 0.9rem; border-radius: 999px;
  color: var(--mist); font-size: 0.95rem; font-weight: 500;
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}
.menu a:hover { color: var(--white); }
.menu a.is-active { color: var(--white); background: rgba(201, 204, 209, 0.1); }

.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; border-radius: 12px; position: relative; }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--white); border-radius: 2px; transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.burger span:first-child { top: 16px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.95rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(0.98); }
.btn-primary { background: var(--white); color: var(--ink); box-shadow: 0 10px 30px -12px rgba(244, 245, 247, 0.5); }
.btn-primary:hover { background: #fff; box-shadow: 0 16px 40px -12px rgba(244, 245, 247, 0.65); }
.btn-ghost { background: rgba(201, 204, 209, 0.06); border-color: var(--line-strong); color: var(--white); }
.btn-ghost:hover { background: rgba(201, 204, 209, 0.14); border-color: var(--silver); }
.btn-small { padding: 0.6rem 1.2rem; font-size: 0.9rem; background: var(--white); color: var(--ink); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden;
  padding: calc(var(--nav-h) + 2rem) max(1.25rem, calc((100% - 1120px) / 2)) 5rem;
  background: radial-gradient(120% 90% at 80% 10%, #17181d 0%, var(--ink) 60%);
}
#net { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-glow {
  position: absolute; width: 520px; height: 520px; left: 0; top: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(244, 245, 247, 0.14) 0%, rgba(244, 245, 247, 0) 65%);
  transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.6s var(--ease);
}
.hero.is-hover .hero-glow { opacity: 1; }
.hero-word {
  position: absolute; right: 1vw; bottom: -0.12em; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(7rem, 22vw, 21rem); line-height: 1; letter-spacing: -0.04em; user-select: none; pointer-events: none;
  color: transparent; -webkit-text-stroke: 1px rgba(201, 204, 209, 0.14);
  background: linear-gradient(110deg, transparent 35%, rgba(244, 245, 247, 0.18) 50%, transparent 65%) 0 0 / 250% 100% no-repeat;
  -webkit-background-clip: text; background-clip: text;
  animation: shimmer 7s var(--ease) infinite;
}
@keyframes shimmer { 0% { background-position: 130% 0; } 60%, 100% { background-position: -80% 0; } }

.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero-hi { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; color: var(--silver); }
.hero-name {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.04em; line-height: 0.95;
  font-size: clamp(4.2rem, 15vw, 9.5rem);
  background: linear-gradient(180deg, #ffffff 15%, #9a9fa8 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 0.1em 0 0.12em;
}
.hero-role { font-family: var(--font-display); font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 600; color: var(--white); }
.hero-sub { margin-top: 1.1rem; max-width: 34rem; color: var(--mist); font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

/* one orchestrated entrance */
.hero-line { opacity: 0; transform: translateY(26px); animation: rise 1s var(--ease) forwards; }
.hero-line:nth-child(1) { animation-delay: 0.15s; }
.hero-line:nth-child(2) { animation-delay: 0.3s; }
.hero-line:nth-child(3) { animation-delay: 0.5s; }
.hero-line:nth-child(4) { animation-delay: 0.65s; }
.hero-line:nth-child(5) { animation-delay: 0.8s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.scroll-cue {
  position: absolute; z-index: 2; left: 50%; bottom: 1.6rem; width: 26px; height: 42px; margin-left: -13px;
  border: 1.5px solid var(--line-strong); border-radius: 14px;
}
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--silver); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ===== Sections ===== */
.section { padding: clamp(5rem, 10vw, 8rem) 0; position: relative; }
.section-alt { background: var(--graphite); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 3rem; }
.section-head h2, .contact-title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
}
.section-head p { margin-top: 0.7rem; color: var(--mist); }
.sub-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin: 4.5rem 0 1.5rem; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.about-photo {
  position: relative; border-radius: 26px; overflow: hidden; border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8); max-width: 380px;
}
.about-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(8, 9, 11, 0.45)); pointer-events: none; }
.about-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 1.2s var(--ease); }
.about-photo:hover img { transform: scale(1.04); }
.about-text { display: grid; gap: 1.1rem; max-width: 34rem; }
.about-name { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.about-name span { color: var(--mist); }
.about-brand { color: var(--silver); font-weight: 500; }
.about-text > p:not(.about-name):not(.about-brand) { color: var(--silver); }

.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: flex-start; align-content: flex-start; }
.chip {
  padding: 0.4rem 0.95rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.92rem; color: var(--silver);
  background: rgba(201, 204, 209, 0.04); transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.chip:hover { background: var(--white); color: var(--ink); border-color: var(--white); transform: translateY(-2px); }

/* Experience */
.exp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.exp-card {
  padding: 1.8rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.exp-card:hover { transform: translateY(-6px); border-color: var(--line-strong); background: var(--panel-2); }
.exp-num { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.8rem; font-family: var(--font-display); }
.exp-num .count { font-size: 4rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; background: linear-gradient(180deg, #fff, #8d929b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.exp-num small { color: var(--mist); font-size: 1rem; }
.exp-card h4 { font-size: 1.1rem; font-weight: 600; color: var(--white); line-height: 1.35; }

/* Education: SLIIT row, then entries left + uniform photo right */
.edu { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.1rem; }
.edu-sliit { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.edu-stack { display: grid; gap: 1.1rem; align-content: stretch; grid-auto-rows: 1fr; }
.edu-card {
  padding: 1.7rem 1.9rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line);
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.edu-card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--panel-2); }
.edu-stack .edu-card { display: flex; align-items: center; }
.edu-body { display: grid; gap: 0.55rem; justify-items: start; }
.edu-card h4 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.edu-card p { color: var(--mist); font-size: 1rem; }
.pill { margin-top: 0.3rem; padding: 0.25rem 0.8rem; border-radius: 999px; font-size: 0.85rem; border: 1px solid var(--line-strong); color: var(--silver); }
.pill-live { color: var(--ink); background: var(--white); border-color: var(--white); position: relative; padding-left: 1.7rem; }
.pill-live::before { content: ""; position: absolute; left: 0.75rem; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #20202a; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: 0.35; } }
.edu-logo { flex: none; width: clamp(96px, 14vw, 140px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #fff; border: 1px solid var(--line-strong); transition: transform 0.7s var(--ease); }
.edu-sliit:hover .edu-logo { transform: rotate(6deg) scale(1.05); }
.edu-logo img { width: 100%; height: 100%; object-fit: cover; }
.edu-photo { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); min-height: 430px; }
.edu-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transition: transform 1.2s var(--ease); }
.edu-photo:hover img { transform: scale(1.04); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.skill-card { padding: 1.8rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); display: grid; align-content: start; gap: 1.1rem; transition: transform 0.5s var(--ease), border-color 0.5s var(--ease); }
.skill-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.skill-card h4 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }

/* ===== Services ===== */
.svc-main { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.svc {
  position: relative; padding: 1.8rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.svc::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(244, 245, 247, 0.09), transparent 60%); opacity: 0; transition: opacity 0.5s var(--ease); pointer-events: none; }
.svc:hover { transform: translateY(-6px); border-color: var(--line-strong); background: var(--panel-2); }
.svc:hover::before { opacity: 1; }
.svc h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.svc p { color: var(--mist); font-size: 1rem; }
.svc-big { padding: 2.4rem; }
.svc-big h3 { font-size: 1.7rem; letter-spacing: -0.02em; }
.svc-big p { font-size: 1.08rem; max-width: 26rem; }
.svc-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; margin-bottom: 1.4rem; background: linear-gradient(145deg, #eceef1, #8f949c); color: var(--ink); transition: transform 0.6s var(--ease); }
.svc-icon svg { width: 26px; height: 26px; }
.svc-big:hover .svc-icon { transform: rotate(-8deg) scale(1.08); }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 1.1rem; }

/* ===== Portfolio ===== */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.work {
  position: relative; display: block; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); text-align: left;
  transition: transform 0.6s var(--ease), border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.work { overflow: hidden; }
.work img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.1s var(--ease); }
.work:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9); }
.work:hover img { transform: scale(1.05); }
.work-cap { display: block; padding: 1rem 1.2rem 1.1rem; border-top: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; line-height: 1.35; color: var(--silver); transition: color 0.4s var(--ease); }
.work:hover .work-cap { color: var(--white); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1.5rem; background: rgba(5, 6, 8, 0.9); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox figure { max-width: min(1100px, 100%); transform: scale(0.94); transition: transform 0.6s var(--ease); }
.lightbox.is-open figure { transform: none; }
.lightbox img { max-height: 78vh; width: auto; max-width: 100%; margin-inline: auto; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); }
.lightbox figcaption { margin-top: 1rem; text-align: center; color: var(--silver); font-family: var(--font-display); font-weight: 600; }
.lb-close { position: absolute; top: 1.2rem; right: 1.2rem; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(201, 204, 209, 0.08); font-size: 1.7rem; line-height: 1; transition: transform 0.4s var(--ease), background 0.4s var(--ease); }
.lb-close:hover { transform: rotate(90deg); background: rgba(201, 204, 209, 0.2); }

/* ===== Contact ===== */
.contact-wrap { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.contact-sub { margin-top: 1rem; color: var(--mist); font-size: 1.15rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.contact-mail { margin-top: 1.4rem; font-family: var(--font-display); font-weight: 600; color: var(--silver); word-break: break-all; }
.socials { display: grid; gap: 0.9rem; }
.social {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.6rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); transition: transform 0.5s var(--ease), border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.social:hover { transform: translateX(8px); border-color: var(--silver); background: var(--panel-2); }
.social-name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.social-handle { color: var(--mist); }

/* ===== Footer & toast ===== */
.footer { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; padding: 2rem max(1.25rem, calc((100% - 1120px) / 2)); border-top: 1px solid var(--line); color: var(--mist); font-size: 0.95rem; }
.footer a { transition: color 0.3s var(--ease); }
.footer a:hover { color: var(--white); }
.toast { position: fixed; left: 50%; bottom: 2rem; z-index: 300; padding: 0.8rem 1.4rem; border-radius: 999px; background: var(--white); color: var(--ink); font-weight: 600; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; transition: transform 0.5s var(--ease), opacity 0.5s var(--ease); }
.toast.is-show { transform: translate(-50%, 0); opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .gallery { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .exp { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .burger { display: block; }
  .nav-cta { display: none; }
  .menu {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0.2rem; padding: 1rem 1.25rem 1.5rem; margin: 0;
    background: rgba(8, 9, 11, 0.96); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), visibility 0.5s;
  }
  .menu.is-open { transform: none; opacity: 1; visibility: visible; }
  .menu a { padding: 0.9rem 1rem; font-size: 1.05rem; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 340px; }
  .edu { grid-template-columns: 1fr; }
  .edu-stack { grid-auto-rows: auto; }
  .edu-photo { min-height: 0; aspect-ratio: 4 / 5; }
  .skills, .svc-main { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .svc-grid { grid-template-columns: 1fr; }
  .edu-sliit { flex-direction: column-reverse; align-items: flex-start; }
  .hero-actions .btn { flex: 1 1 100%; }
}

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