/* Theme */
:root {
  --bg-deep: #070a12;
  --bg-panel: #0d111c;
  --bg-card: #12182a;
  --bg-sidebar: #080c14;
  --border: rgba(148, 163, 184, 0.12);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-from: #a855f7;
  --accent-to: #3b82f6;
  --glow: rgba(168, 85, 247, 0.35);
  --success: #34d399;
  --sidebar-w: 288px;
  --font: "Inter", system-ui, sans-serif;
  --font-heading: Georgia, "Times New Roman", Times, serif;
  --radius: 14px;
  --radius-lg: 22px;
  --text-h4: clamp(1.125rem, 2.2vw, 1.3125rem);
  --text-h5: clamp(0.8125rem, 1.45vw, 0.875rem);
  --text-h6: clamp(0.6875rem, 1.2vw, 0.8125rem);
}

html[data-theme="light"] {
  --bg-deep: #f8fafc;
  --bg-panel: #ffffff;
  --bg-card: #f1f5f9;
  --bg-sidebar: #0f172a;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --text-muted: #64748b;
  --glow: rgba(59, 130, 246, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

html[data-theme="light"] .main {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

/* Headings: Georgia (body stays Inter) */
h1,
h2,
h3,
.hero__title,
.hero__role,
.section-title,
.project-card h3,
.timeline h3,
.service-card h3,
.stat-card strong,
.quote-card footer strong {
  font-family: var(--font-heading);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-success {
  color: var(--success);
  font-weight: 600;
}

/* Sidebar (drawer: closed by default, full-width main content) */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 2.25rem 1.35rem 1.75rem;
  z-index: 100;
  font-family: var(--font-heading);
  transform: translateX(100%);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  pointer-events: none;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0);
}

body.menu-open .sidebar {
  transform: translateX(0);
  pointer-events: auto;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}

.sidebar__brand {
  font-weight: 700;
  font-size: var(--text-h4);
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  text-align: center;
  margin-bottom: 1.65rem;
  line-height: 1.3;
  padding: 0 0.25rem;
}

html[data-theme="light"] .sidebar__brand {
  color: #fff;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: var(--text-h5);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  line-height: 1.35;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: #0f172a;
  background: #fff;
}

.nav-link__icon {
  display: flex;
  opacity: 0.9;
}

.nav-link__icon svg {
  width: 16px;
  height: 16px;
}

.sidebar__bottom {
  margin-top: auto;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar__social {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.sidebar__social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  transition: background 0.2s, border-color 0.2s;
}

.sidebar__social a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.sidebar__copy {
  margin: 0;
  font-size: var(--text-h6);
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  line-height: 1.5;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-h5);
  cursor: pointer;
  font-family: var(--font-heading);
}

.theme-toggle__icon svg {
  width: 15px;
  height: 15px;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.theme-toggle__icon {
  position: relative;
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

.nav-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 130;
  transition: right 0.28s ease;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  padding: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.nav-toggle:hover {
  border-color: rgba(168, 85, 247, 0.45);
}

.nav-toggle__hamburger {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
}

.nav-toggle__close {
  display: none;
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 300;
  color: var(--text);
  margin-top: -2px;
}

body.menu-open .nav-toggle__hamburger {
  display: none;
}

body.menu-open .nav-toggle__close {
  display: block;
}

/* Main: full width when menu closed; reserves space when menu open (no overlap) */
.main {
  margin-right: 0;
  min-height: 100vh;
  transition: margin-right 0.28s ease;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(168, 85, 247, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(59, 130, 246, 0.12), transparent),
    var(--bg-deep);
}

.section {
  padding: 6rem clamp(1.5rem, 5vw, 4rem);
  max-width: 1160px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-to);
  margin: 0 0 0.75rem;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 2rem;
  line-height: 1.22;
}

/* Smaller section heading (h4 scale) */
.section-title--h4 {
  font-size: var(--text-h4);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 1.35rem;
  line-height: 1.35;
}

/* Hero */
.hero {
  padding-top: 6.5rem;
  padding-bottom: 4.5rem;
  min-height: min(100vh, 920px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__content {
    order: 1;
  }

  .hero__visual {
    order: 0;
    justify-self: center;
    width: fit-content;
    max-width: min(100%, 360px);
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions,
  .hero__social {
    justify-content: center;
  }
}

.hero__title {
  font-size: clamp(2.4rem, 5vw, 3.45rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

/* Hero greeting ≈ h3 scale (page keeps one h1 for accessibility) */
.hero__title--h3 {
  font-size: clamp(1.5rem, 3.4vw, 1.9375rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.015em;
  line-height: 1.28;
}

.hero__role {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 700;
  margin: 0 0 1.35rem;
}

/* Hero role line ≈ h4 scale */
.hero__role--h4 {
  font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 1.35rem;
  line-height: 1.35;
}

/* Hero intro ≈ h5 scale */
.hero__lead {
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 0 1.5rem;
  font-size: var(--text-h5);
  font-weight: 400;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

/* Hero + About CTAs: h5-sized type + tighter buttons */
.hero__actions .btn,
.about__text .btn {
  font-size: var(--text-h5);
  font-weight: 600;
  padding: 0.48rem 0.95rem;
  border-radius: 10px;
  gap: 0.35rem;
}

.hero__actions .btn svg,
.about__text .btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.hero__actions .btn--primary {
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.28);
}

.hero__actions .btn--primary:hover {
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.36);
}

.about__text .btn--secondary {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.hero__social {
  display: flex;
  gap: 0.85rem;
}

.hero__social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.hero__social a:hover {
  color: var(--text);
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.08);
}

.hero__visual {
  position: relative;
  justify-self: end;
  width: fit-content;
  max-width: 100%;
}

.hero__frame {
  position: relative;
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.15),
    0 16px 40px rgba(168, 85, 247, 0.22);
  transform: rotate(-1.5deg);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.hero__frame:hover {
  transform: rotate(-1deg) translateY(-2px);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.2),
    0 24px 52px rgba(168, 85, 247, 0.28);
}

.hero__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: calc(var(--radius-lg) - 2px);
  background: var(--bg-card);
}

.hero__stat {
  position: absolute;
  bottom: 12%;
  left: -8%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  background: rgba(13, 17, 28, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.68rem;
  color: var(--text-muted);
  max-width: 168px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.hero__stat-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.hero__stat strong {
  display: block;
  color: var(--text);
  font-size: 0.78rem;
  font-family: var(--font-heading);
  line-height: 1.2;
}

.hero__stat strong + span {
  display: block;
  font-size: 0.65rem;
  line-height: 1.3;
  margin-top: 0.1rem;
}

@media (max-width: 900px) {
  .hero__stat {
    left: 50%;
    transform: translateX(-50%);
    bottom: -0.5rem;
  }
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: none;
  align-self: center;
}

.scroll-hint__mouse {
  width: 22px;
  height: 34px;
  border: 2px solid var(--text-muted);
  border-radius: 11px;
  position: relative;
}

.scroll-hint__mouse span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--text-muted);
  border-radius: 2px;
  animation: scroll-dot 1.5s ease-in-out infinite;
}

@keyframes scroll-dot {
  0%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0.4;
    transform: translateY(8px);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  color: #fff;
  box-shadow: 0 8px 28px rgba(168, 85, 247, 0.35);
}

.btn--primary:hover {
  box-shadow: 0 10px 36px rgba(168, 85, 247, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.06);
}

.btn--secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.btn--cv {
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  color: #fff;
  text-decoration: none;
  justify-content: center;
  font-size: var(--text-h5);
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-heading);
  width: 100%;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.28);
}

.btn--cv:hover {
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.36);
}

.sidebar .sidebar__social svg {
  width: 17px;
  height: 17px;
}

/* About */
.about {
  background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.04));
  border-radius: var(--radius-lg);
  margin: 0 clamp(1.25rem, 4vw, 2.5rem);
  padding-left: clamp(1.5rem, 5vw, 3.5rem);
  padding-right: clamp(1.5rem, 5vw, 3.5rem);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .about__grid {
    grid-template-columns: 1fr;
  }
}

.about__bio {
  color: var(--text-muted);
  margin: 0 0 1.65rem;
  font-size: var(--text-h5);
  font-weight: 400;
  line-height: 1.55;
}

.about__details {
  list-style: none;
  padding: 0;
  margin: 0 0 1.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.about__details li {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.detail-icon {
  color: var(--accent-from);
  flex-shrink: 0;
  margin-top: 1px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-icon svg {
  width: 14px;
  height: 14px;
}

.detail-label {
  display: block;
  font-size: var(--text-h5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.about__details li > div > span:not(.detail-label):not(.text-success) {
  font-size: var(--text-h5);
  font-weight: 500;
  color: var(--text);
}

.about__details .text-success {
  font-size: var(--text-h5);
  font-weight: 600;
}

.about__details a {
  color: var(--accent-to);
  text-decoration: none;
  font-size: var(--text-h5);
  font-weight: 500;
}

.about__details a:hover {
  text-decoration: underline;
}

.about__detail-inline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}

.about__detail-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 0;
  transition: color 0.2s ease, background 0.2s ease;
}

.about__detail-icon-link:hover {
  color: var(--accent-to);
  background: rgba(99, 102, 241, 0.12);
  text-decoration: none;
}

.about__github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  word-break: break-all;
}

.about__github-link .about__detail-icon-link {
  color: inherit;
  padding: 0;
  border-radius: 0;
  background: none;
  transition: none;
}

.about__github-link .about__detail-icon-link:hover {
  color: inherit;
  background: none;
}

.about__github-link svg {
  width: 1em;
  height: 1em;
  display: block;
}

.about__visual {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about__photo-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.about__photo-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
}

.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 600px) {
  .services {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}

.service-card__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.service-card h3 {
  margin: 0;
  font-size: var(--text-h5);
  font-weight: 600;
  line-height: 1.25;
}

.service-card p {
  margin: 0;
  font-size: var(--text-h6);
  color: var(--text-muted);
  line-height: 1.5;
  font-weight: 400;
}

.service-card__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
}

.service-card__icon--1 {
  background: linear-gradient(135deg, #f472b6, #a855f7);
}

.service-card__icon--2 {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
}

.service-card__icon--3 {
  background: linear-gradient(135deg, #34d399, #22d3ee);
}

.service-card__icon--4 {
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

/* Skills */
.skills__ai-title {
  margin: 2rem 0 1rem;
  font-family: var(--font-heading);
  font-size: var(--text-h5);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.skills__row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  justify-content: flex-start;
}

.skills__row--ai {
  margin-top: 0;
}

.skill-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.2rem 1.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 92px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.skill-chip__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  color: #fff;
}

.skill-chip__logo--html {
  background: #e34f26;
}

.skill-chip__logo--css {
  background: #1572b6;
}

.skill-chip__logo--js {
  background: #f7df1e;
  color: #000;
}

.skill-chip__logo--react {
  background: #61dafb;
  color: #0a0a0a;
  font-size: 1.1rem;
}

.skill-chip__logo--php {
  background: #777bb4;
}

.skill-chip__logo--py {
  background: #3776ab;
}

.skill-chip__logo--java {
  background: #f89820;
  color: #000;
  font-size: 1rem;
}

.skill-chip__logo--sql {
  background: #00758f;
}

.skill-chip__logo--git {
  background: #f05032;
  color: #fff;
}

.skill-chip__logo--vercel {
  background: #000;
  color: #fff;
  font-size: 0.85rem;
}

.skill-chip__logo--cursor {
  background: #14120b;
  color: #f7f7f5;
  font-size: 0.65rem;
  letter-spacing: -0.02em;
}

.skill-chip__logo--kiro {
  background: linear-gradient(135deg, #ff9900, #232f3e);
  color: #fff;
  font-size: 0.75rem;
}

.skill-chip__logo--antigravity {
  background: linear-gradient(135deg, #4285f4, #34a853, #fbbc04, #ea4335);
  color: #fff;
  font-size: 0.58rem;
  letter-spacing: -0.03em;
}

.skill-chip__logo--chatgpt {
  background: #10a37f;
  color: #fff;
  font-size: 0.58rem;
}

.skill-chip__logo--codex {
  background: linear-gradient(135deg, #412991, #6366f1);
  color: #fff;
  font-size: 0.72rem;
}

.skill-chip__logo--copilot {
  background: linear-gradient(135deg, #8b5cf6, #6366f1, #22d3ee);
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: -0.02em;
}

/* Projects */
.projects__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2.75rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-to);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.link-arrow:hover {
  text-decoration: underline;
}

.projects__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.projects__cards--single {
  grid-template-columns: minmax(260px, 420px);
}

.projects__subheading {
  margin: 2.2rem 0 1rem;
  font-size: var(--text-h5);
  font-weight: 600;
  line-height: 1.3;
}

.projects__cards--academic {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

@media (max-width: 960px) {
  .projects__cards,
  .projects__cards--single,
  .projects__cards--academic {
    grid-template-columns: 1fr;
  }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.project-card__shot {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.project-card__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.project-card__video {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #000;
}

.project-card__video--voice {
  height: 150px;
  object-fit: contain;
}

.project-card__shot--grad1 {
  background-image: linear-gradient(135deg, #4c1d95 0%, #1e3a5f 100%);
}

.project-card__shot--grad2 {
  background-image: linear-gradient(135deg, #0f766e 0%, #312e81 100%);
}

.project-card__shot--grad3 {
  background-image: linear-gradient(135deg, #9d174d 0%, #1e40af 100%);
}

.project-card__body {
  padding: 1.5rem 1.4rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
}

.project-card p {
  margin: 0 0 1.15rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.65;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tags span {
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}

.project-card__link {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-to);
  text-decoration: none;
}

.project-card__link:hover {
  text-decoration: underline;
}

/* Experience */
.experience__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .experience__grid {
    grid-template-columns: 1fr;
  }
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid var(--border);
  padding-left: 1.75rem;
}

.timeline li {
  position: relative;
  padding-bottom: 2.25rem;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: calc(-1.75rem - 5px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  box-shadow: 0 0 12px var(--glow);
}

.timeline__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.timeline h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.timeline__company {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: var(--accent-to);
  font-size: 0.9rem;
}

.timeline p:last-child {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.stat-card__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.stat-card__icon {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.85;
  flex-shrink: 0;
}

.stat-card strong {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.stat-card__sub {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Certifications */
.certifications__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.certifications__subheading {
  margin: 2.2rem 0 1rem;
  font-size: var(--text-h5);
  font-weight: 600;
  line-height: 1.3;
}

.certifications__grid--secondary {
  margin-top: 0;
}

@media (max-width: 900px) {
  .certifications__grid {
    grid-template-columns: 1fr;
  }
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cert-card__media {
  position: relative;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  min-height: 200px;
}

.cert-card__media img {
  max-width: 100%;
  max-height: 320px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.cert-card__drive {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.cert-card__drive:hover {
  background: rgba(15, 23, 42, 0.9);
  transform: scale(1.05);
}

[data-theme="light"] .cert-card__drive {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .cert-card__drive:hover {
  background: #fff;
}

.cert-card__title {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  font-size: var(--text-h6);
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  border-top: 1px solid var(--border);
}

/* Testimonials / LinkedIn social proof */
.social-proof {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .social-proof {
    grid-template-columns: 1fr;
  }
}

.social-proof__item {
  margin: 0;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.social-proof__thumb {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  line-height: 0;
  outline: none;
}

.social-proof__thumb:focus-visible {
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.45);
}

.social-proof__thumb img {
  flex: 1 1 auto;
  width: 100%;
  min-height: 260px;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}

/* Experience screenshot: show full capture (no crop) inside the matched card height */
.social-proof__thumb--static {
  align-items: flex-start;
  justify-content: flex-start;
  background: rgba(7, 10, 18, 0.65);
  overflow-y: auto;
  overflow-x: hidden;
}

.social-proof__thumb--static img {
  cursor: default;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: top center;
}

.social-proof__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 10, 18, 0.88));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.social-proof__thumb:hover .social-proof__overlay,
.social-proof__thumb:focus-visible .social-proof__overlay {
  opacity: 1;
}

.social-proof__overlay span {
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.social-proof__caption {
  flex-shrink: 0;
  padding: 1rem 1.15rem 1.2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.social-proof__profile-link {
  flex-shrink: 0;
  display: block;
  padding: 1rem 1.15rem 1.25rem;
  margin-top: 0;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--accent-to);
  text-decoration: none;
  border-top: 1px solid var(--border);
  transition: background 0.2s, color 0.2s;
}

.social-proof__profile-link:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--accent-from);
}

/* CV request dialog */
.cv-dialog {
  position: relative;
  max-width: min(92vw, 420px);
  width: 100%;
  margin: auto;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  font-family: var(--font);
}

.cv-dialog::backdrop {
  background: rgba(2, 4, 10, 0.62);
  backdrop-filter: blur(4px);
}

.cv-dialog__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.cv-dialog__close:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.cv-dialog__title {
  margin: 0 2.25rem 0.75rem 0;
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  font-weight: 700;
  line-height: 1.25;
}

.cv-dialog__status {
  margin: 0 0 1rem;
  font-size: var(--text-h5);
  color: var(--accent-to);
  line-height: 1.45;
}

.cv-dialog__body,
.cv-dialog__hint {
  margin: 0 0 0.85rem;
  font-size: var(--text-h5);
  color: var(--text-muted);
  line-height: 1.55;
}

.cv-dialog__hint {
  margin-bottom: 1.25rem;
  font-style: italic;
}

.cv-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cv-dialog__actions .btn {
  font-size: var(--text-h5);
  padding: 0.5rem 1rem;
  border-radius: 10px;
}

.cv-dialog__actions .btn svg {
  width: 15px;
  height: 15px;
}

/* Contact */
.contact-section {
  padding-top: 4rem;
}

.contact-section__inner {
  max-width: 540px;
}

.contact__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact__form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__status {
  margin: 0;
  min-height: 1.35em;
  font-size: var(--text-h5);
  line-height: 1.45;
}

.contact__status--ok {
  color: var(--success);
}

.contact__status--err {
  color: #f87171;
}

.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.contact__form input::placeholder,
.contact__form textarea::placeholder {
  color: var(--text-muted);
}

.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.contact__form .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Footer */
.site-footer {
  margin-right: 0;
  padding: 2rem clamp(1.5rem, 5vw, 4rem) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: margin-right 0.28s ease;
}

.to-top {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  font-family: inherit;
}

.to-top:hover {
  border-color: var(--accent-from);
}

body.menu-open .main,
body.menu-open .site-footer {
  margin-right: var(--sidebar-w);
}

body.menu-open .nav-toggle {
  right: calc(var(--sidebar-w) + 1.25rem);
}

html[data-theme="light"] .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
}
