/* ===== Variables ===== */
:root {
  --bg: #0a0e14;
  --bg-elevated: #111820;
  --bg-card: rgba(17, 24, 32, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 212, 0.4);
  --text: #e8edf4;
  --text-muted: #8b9cb3;
  --accent: #22d3ee;
  --accent-dim: #0891b2;
  --accent-glow: rgba(34, 211, 238, 0.25);
  --on-accent: #0a0e14;
  --warm: #f59e0b;
  --header-bg: rgba(10, 14, 20, 0.75);
  --header-shadow: rgba(0, 0, 0, 0.35);
  --nav-mobile-bg: rgba(10, 14, 20, 0.95);
  --grid-line: rgba(255, 255, 255, 0.03);
  --glow-warm: rgba(245, 158, 11, 0.08);
  --accent-ghost-hover: rgba(34, 211, 238, 0.06);
  --accent-soft: rgba(34, 211, 238, 0.1);
  --accent-soft-md: rgba(34, 211, 238, 0.12);
  --accent-shadow: rgba(34, 211, 238, 0.06);
  --badge-accent: rgba(34, 211, 238, 0.15);
  --badge-muted: rgba(139, 156, 179, 0.15);
  --badge-warm: rgba(245, 158, 11, 0.15);
  --radius: 14px;
  --radius-lg: 20px;
  --font: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
  --header-h: 72px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f0f4f9;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.88);
  --border: rgba(15, 23, 42, 0.1);
  --border-hover: rgba(8, 145, 178, 0.45);
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #0891b2;
  --accent-dim: #0e7490;
  --accent-glow: rgba(8, 145, 178, 0.2);
  --on-accent: #ffffff;
  --header-bg: rgba(240, 244, 249, 0.82);
  --header-shadow: rgba(15, 23, 42, 0.08);
  --nav-mobile-bg: rgba(255, 255, 255, 0.97);
  --grid-line: rgba(15, 23, 42, 0.06);
  --glow-warm: rgba(245, 158, 11, 0.12);
  --accent-ghost-hover: rgba(8, 145, 178, 0.08);
  --accent-soft: rgba(8, 145, 178, 0.1);
  --accent-soft-md: rgba(8, 145, 178, 0.12);
  --accent-shadow: rgba(8, 145, 178, 0.1);
  --badge-accent: rgba(8, 145, 178, 0.12);
  --badge-muted: rgba(100, 116, 139, 0.12);
  --badge-warm: rgba(245, 158, 11, 0.14);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.35s ease, color 0.35s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

strong {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Background ===== */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 480px;
  height: 480px;
  top: -120px;
  right: -80px;
  background: var(--accent-glow);
}

.bg-glow--2 {
  width: 360px;
  height: 360px;
  bottom: 20%;
  left: -100px;
  background: var(--glow-warm);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), background-color 0.35s ease;
}

.header--scrolled {
  border-color: var(--border);
  box-shadow: 0 8px 32px var(--header-shadow);
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.logo-accent {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  width: 100%;
}

.header-actions {
  position: absolute;
  right: clamp(1.25rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: flex;
  padding: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-switch__btn {
  padding: 0.35rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.lang-switch__btn:hover {
  color: var(--text);
}

.lang-switch__btn.is-active {
  color: var(--on-accent);
  background: var(--accent);
  box-shadow: 0 2px 12px var(--accent-glow);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.theme-toggle__icon {
  width: 18px;
  height: 18px;
}

.theme-toggle__icon--moon {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

[data-theme="light"] .theme-toggle__icon--moon {
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Main layout ===== */
main {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) clamp(1.25rem, 5vw, 3rem) 4rem;
}

/* ===== Hero ===== */
.hero {
  padding: 2rem 0 5rem;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.1s forwards;
}

.hero-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s infinite;
}

.hero-name {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s forwards;
}

.hero-name-accent {
  color: var(--accent);
}

.hero-title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.32s forwards;
}

.hero-title-line {
  display: block;
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.35s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
  opacity: 0;
  animation: fadeUp 0.7s 0.45s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--border-hover);
  background: var(--accent-ghost-hover);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  opacity: 0;
  animation: fadeUp 0.7s 0.55s forwards;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--mono);
}

.stat-suffix {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== Sections ===== */
.section {
  padding: 4rem 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent-dim);
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

.section-header h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ===== About ===== */
.about-card {
  display: flex;
  gap: 1.75rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.about-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 40px var(--accent-shadow);
}

.about-photo {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
  overflow: hidden;
  align-self: flex-start;
}

.about-photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.about-text {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.about-text strong {
  color: var(--text);
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.skill-category {
  padding: 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: transform var(--transition), border-color var(--transition);
}

.skill-category:hover {
  border-color: var(--border-hover);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skill-category-icon {
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft-md);
  border-radius: 10px;
  font-family: var(--mono);
}

.skill-category h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skill-tag {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all 0.25s;
}

.skill-tag:hover,
.skill-tag.active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.skill-hint {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--mono);
  min-height: 1.5em;
  transition: color 0.2s;
}

.skill-hint.has-tip {
  color: var(--accent);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--border) 80%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 1.25rem;
  width: 16px;
  height: 16px;
  margin-left: -1px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent-dim);
  z-index: 2;
}

.timeline-item--current .timeline-marker {
  border-color: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.timeline-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: ring 2s ease-out infinite;
}

.timeline-marker--edu {
  border-color: var(--warm);
}

.timeline-card {
  padding: 1.75rem;
  margin-left: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.timeline-card:hover {
  transform: translateX(6px);
  border-color: var(--border-hover);
  box-shadow: -4px 0 0 var(--accent);
}

.timeline-card--edu:hover {
  box-shadow: -4px 0 0 var(--warm);
}

.timeline-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
  border-radius: 6px;
  background: var(--badge-accent);
  color: var(--accent);
}

.timeline-badge--past {
  background: var(--badge-muted);
  color: var(--text-muted);
}

.timeline-badge--edu {
  background: var(--badge-warm);
  color: var(--warm);
}

.timeline-card time {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.timeline-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.timeline-place {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.timeline-card--edu .timeline-place {
  color: var(--warm);
}

.timeline-card p:last-child {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-top {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: all 0.2s;
}

.footer-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

/* ===== Reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Keyframes ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* ===== Hero Visual Grid ===== */
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  filter: drop-shadow(0 0 24px var(--accent-shadow));
}

/* SVG Anim */
.smt-pulse {
  transform-origin: 250px 160px;
  animation: smtPulse 3s infinite linear;
}

.smt-head {
  animation: smtMove 8s infinite ease-in-out;
}

@keyframes smtPulse {
  0% { transform: scale(0.8); opacity: 0.3; }
  50% { transform: scale(1.3); opacity: 0.8; }
  100% { transform: scale(0.8); opacity: 0.3; }
}

@keyframes smtMove {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-80px, 30px); }
  50% { transform: translate(-20px, -40px); }
  75% { transform: translate(40px, 10px); }
}

.pcb-track-1 {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: drawTrack 5s forwards ease-in-out infinite;
}

.pcb-track-2 {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawTrack 4s forwards ease-in-out infinite;
}

@keyframes drawTrack {
  to {
    stroke-dashoffset: 0;
  }
}

/* ===== Projects Section ===== */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px var(--accent-shadow);
}

.project-card__content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card__tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--badge-accent);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.project-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  transition: color 0.2s, transform 0.2s;
  align-self: flex-start;
}

.project-card__link:hover {
  color: var(--text);
}

.project-card__link:hover .project-card__arrow {
  transform: translateX(4px);
}

.project-card__arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.project-card__link-dummy {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.7;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: auto;
}

/* ===== Contact Section ===== */
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 40px var(--accent-shadow);
}

@media (min-width: 768px) {
  .contact-card {
    flex-direction: row;
    align-items: center;
  }
  
  .contact-info {
    flex: 1;
    border-right: 1px solid var(--border);
    padding-right: 2.5rem;
  }
  
  .contact-links {
    flex: 1;
    padding-left: 1rem;
  }
}

.contact-info h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.email-copy-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.email-label {
  font-size: 0.75rem;
  font-family: var(--mono);
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.email-copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  transition: border-color 0.2s;
  max-width: 320px;
}

.email-copy-box:hover,
.email-copy-box:focus-within {
  border-color: var(--accent);
}

.email-text {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
  user-select: all;
  word-break: break-all;
}

.email-copy-btn {
  color: var(--text-muted);
  transition: color 0.2s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.email-copy-btn:hover {
  color: var(--accent);
}

.email-copy-btn:active {
  transform: scale(0.92);
}

.email-copy-btn svg {
  width: 18px;
  height: 18px;
}

.copy-toast {
  font-family: var(--mono);
  font-size: 0.75rem;
  min-height: 1.5em;
  color: var(--accent);
  transition: opacity 0.25s;
  opacity: 0;
}

.copy-toast.is-visible {
  opacity: 1;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.contact-link-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-weight: 600;
  transition: all 0.25s;
}

.contact-btn-icon {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 0.9rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--border);
}

.contact-btn-svg {
  width: 20px;
  height: 20px;
}

/* Brands Styling */
.contact-link-btn--linkedin:hover {
  border-color: #0077b5;
  box-shadow: 0 4px 16px rgba(0, 119, 181, 0.15);
  background: rgba(0, 119, 181, 0.05);
}

.contact-link-btn--linkedin:hover .contact-btn-icon {
  background: #0077b5;
  color: #fff;
}

.contact-link-btn--telegram:hover {
  border-color: #24A1DE;
  box-shadow: 0 4px 16px rgba(36, 161, 222, 0.15);
  background: rgba(36, 161, 222, 0.05);
}

.contact-link-btn--telegram:hover .contact-btn-icon {
  background: #24A1DE;
  color: #fff;
}

.contact-link-btn--github:hover {
  border-color: var(--text);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.contact-link-btn--github:hover svg {
  color: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    background: var(--nav-mobile-bg);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .about-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-photo {
    width: 100px;
    height: 100px;
  }

  .stat-divider {
    display: none;
  }

  .hero-stats {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-card:hover {
    transform: none;
  }

  /* Responsive expansions */
  .hero-grid {
    gap: 2rem;
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-sub {
    margin-inline: auto;
  }
  
  .hero-visual {
    order: -1;
  }

  .contact-card {
    padding: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
