/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Colors */
  --bg-primary:     #0d1117;
  --bg-surface:     #161b22;
  --bg-elevated:    #1c2929;
  --border-subtle:  #21262d;
  --border-teal:    #1e3a3a;

  --teal-primary:   #00b4b4;
  --teal-dark:      #007a7a;
  --teal-light:     #5eead4;
  --teal-glow:      rgba(0, 180, 180, 0.12);
  --teal-glow-lg:   rgba(0, 180, 180, 0.20);

  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #484f58;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 5rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(0, 180, 180, 0.18);
  --shadow-glow-sm: 0 0 12px rgba(0, 180, 180, 0.12);

  /* Transitions */
  --t-fast:  150ms ease;
  --t-base:  280ms ease;
  --t-slow:  500ms ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--teal-primary);
  color: var(--bg-primary);
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section-padding {
  padding-block: var(--space-3xl);
}

.alt-bg {
  background-color: var(--bg-surface);
}

.teal  { color: var(--teal-primary); }
.mono  { font-family: var(--font-mono); }

.section-intro {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--teal-primary);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.section-heading {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 540px;
  margin-inline: auto;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--teal-primary);
  color: var(--bg-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
}

.btn-primary:hover {
  background: var(--teal-light);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--teal-primary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--teal-primary);
  cursor: pointer;
  transition: background var(--t-base), color var(--t-base), transform var(--t-fast);
}

.btn-outline:hover {
  background: var(--teal-glow);
  transform: translateY(-2px);
}

/* Tags */
.tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-teal);
  color: var(--teal-light);
  letter-spacing: 0.03em;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 68px;
  transition: background var(--t-base), backdrop-filter var(--t-base),
              border-bottom var(--t-base), height var(--t-base);
}

#navbar.scrolled {
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  height: 60px;
}

.nav-container {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  transition: opacity var(--t-fast);
}

.nav-logo:hover { opacity: 0.85; }

.logo-bracket {
  color: var(--teal-primary);
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  position: relative;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  transition: color var(--t-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--teal-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--t-base);
  border-radius: 1px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--teal-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.btn-hire {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal-primary);
  padding: 0.5rem 1.2rem;
  border: 1.5px solid var(--teal-primary);
  border-radius: var(--radius-md);
  transition: background var(--t-base), color var(--t-base), box-shadow var(--t-base);
  white-space: nowrap;
}

.btn-hire:hover {
  background: var(--teal-primary);
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow-sm);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-base);
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(13, 17, 23, 0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-slow);
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: all;
  /* Safari: force a new stacking context so child touch targets register */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.mobile-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--t-fast);
  /* Safari touch fix */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding: 0.75rem;        /* larger tap target */
  margin: -0.75rem;        /* offset so visual size stays the same */
}

.mobile-close:hover { color: var(--teal-primary); }

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.mobile-link {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--t-base);
  /* Safari touch fix */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.mobile-link:hover { color: var(--teal-primary); }

/* ============================================================
   HERO
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-top: 4rem;
  width: 100%;
}

.hero-label {
  display: block;
  font-size: 0.8rem;
  color: var(--teal-primary);
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.hero-name {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--teal-light);
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Hero Visual — Orbit Rings */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-container {
  position: relative;
  width: 320px;
  height: 320px;
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid;
  transform: translate(-50%, -50%);
}

.orbit-1 {
  width: 130px;
  height: 130px;
  border-color: rgba(0, 180, 180, 0.3);
  animation: orbit-spin 12s linear infinite;
}

.orbit-2 {
  width: 220px;
  height: 220px;
  border-color: rgba(0, 180, 180, 0.18);
  animation: orbit-spin 20s linear infinite reverse;
}

.orbit-3 {
  width: 310px;
  height: 310px;
  border-color: rgba(0, 180, 180, 0.1);
  animation: orbit-spin 28s linear infinite;
}

.orbit-dot {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: var(--teal-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--teal-primary);
}

.orbit-2 .orbit-dot {
  width: 8px;
  height: 8px;
  background: var(--teal-light);
  box-shadow: 0 0 6px var(--teal-light);
}

.orbit-3 .orbit-dot {
  width: 6px;
  height: 6px;
  background: var(--teal-dark);
  box-shadow: 0 0 5px var(--teal-dark);
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: var(--bg-elevated);
  border: 2px solid var(--teal-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--teal-primary);
  box-shadow: 0 0 30px var(--teal-glow-lg);
}

@keyframes orbit-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}

.scroll-indicator i {
  color: var(--teal-primary);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(6px); }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: center;
}

/* Photo Frame */
.about-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.photo-frame {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 2px solid var(--teal-dark);
  box-shadow: var(--shadow-glow);
  max-width: 300px;
  width: 100%;
}

.photo-frame::before,
.photo-frame::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--teal-primary);
  border-style: solid;
  z-index: 2;
}

.photo-frame::before {
  top: -2px;
  left: -2px;
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}

.photo-frame::after {
  bottom: -2px;
  right: -2px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}

.about-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  filter: grayscale(10%) contrast(1.05);
  transition: filter var(--t-slow);
}

.photo-frame:hover .about-photo {
  filter: grayscale(0%) contrast(1.1);
}

/* Stats */
.about-stats {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 300px;
}

.stat-item {
  flex: 1;
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.875rem 0.5rem;
}

.stat-number {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* About Content */
.about-content .section-label {
  display: block;
  text-align: left;
  margin-bottom: var(--space-sm);
}

.about-text {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

.about-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.about-list i {
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.service-card {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: linear-gradient(180deg, var(--teal-primary), var(--teal-dark));
  transition: height var(--t-slow);
  border-radius: 0 0 3px 3px;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-teal);
  box-shadow: var(--shadow-glow);
}

.service-card:hover::before {
  height: 100%;
}

.service-icon {
  width: 52px;
  height: 52px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--teal-primary);
  margin-bottom: 1.25rem;
  transition: background var(--t-base), box-shadow var(--t-base);
}

.service-card:hover .service-icon {
  background: var(--teal-glow);
  box-shadow: var(--shadow-glow-sm);
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ============================================================
   EXPERIENCE / TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--teal-primary) 0%, var(--teal-dark) 60%, transparent 100%);
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 2.5rem);
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item.right {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 2.5rem);
}

.timeline-node {
  position: absolute;
  top: 1.5rem;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: var(--teal-primary);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 0 rgba(0, 180, 180, 0.4);
  animation: node-pulse 2.5s ease-in-out infinite;
  z-index: 1;
}

@keyframes node-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 180, 180, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 180, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 180, 180, 0); }
}

.timeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  max-width: 440px;
  width: 100%;
  position: relative;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}

.timeline-card::after {
  content: '';
  position: absolute;
  top: 1.2rem;
  border: 9px solid transparent;
}

.timeline-item:not(.right) .timeline-card::after {
  right: -18px;
  border-left-color: var(--border-subtle);
}

.timeline-item.right .timeline-card::after {
  left: -18px;
  border-right-color: var(--border-subtle);
}

.timeline-card:hover {
  border-color: var(--border-teal);
  box-shadow: var(--shadow-glow-sm);
}

.timeline-year {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.timeline-company {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.timeline-role {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
}

.timeline-bullets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.timeline-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.timeline-bullets i {
  font-size: 0.8rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.skills-col-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* Skill Bars */
.skill-item {
  margin-bottom: 1.4rem;
}

.skill-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
}

.skill-header span:first-child {
  color: var(--text-secondary);
}

.skill-header span:last-child {
  font-size: 0.78rem;
  font-weight: 500;
}

.skill-track {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal-dark), var(--teal-primary) 60%, var(--teal-light));
  border-radius: 3px;
  transition: width 1.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-fill.animate {
  width: var(--fill-width);
}

/* Badge Groups */
.badge-group {
  margin-bottom: 1.5rem;
}

.badge-group-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--teal-light);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-fast);
  cursor: default;
}

.tech-badge:hover {
  border-color: var(--teal-primary);
  box-shadow: var(--shadow-glow-sm);
  transform: translateY(-1px);
}

/* ============================================================
   PROJECTS
   ============================================================ */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--teal-glow);
  border-color: var(--teal-primary);
  color: var(--teal-primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-teal);
  box-shadow: var(--shadow-glow);
}

.project-image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.project-card:hover .project-image-wrap img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 122, 122, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t-base);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.overlay-btn {
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: var(--radius-md);
  transition: background var(--t-fast);
}

.overlay-btn:hover {
  background: rgba(255,255,255,0.15);
}

.project-body {
  padding: 1.5rem;
}

.project-category {
  font-size: 0.75rem;
  color: var(--teal-primary);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.4rem;
}

.project-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.project-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.project-metric {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--teal-light);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-weight: 500;
}

.project-metric i {
  font-size: 0.85rem;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-intro {
  color: var(--text-secondary);
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 42px;
  height: 42px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-primary);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: background var(--t-base), border-color var(--t-base);
}

.contact-item:hover .contact-icon {
  background: var(--teal-glow);
  border-color: var(--teal-dark);
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.contact-value {
  font-size: 1rem;
  color: var(--text-primary);
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base), transform var(--t-fast);
}

.social-btn:hover {
  background: var(--teal-primary);
  border-color: var(--teal-primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
}

/* Contact Form */
.contact-form-wrap {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color var(--t-base), box-shadow var(--t-base);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(0, 180, 180, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.btn-submit {
  width: 100%;
  justify-content: center;
  padding: 0.875rem;
  font-size: 0.95rem;
}

.form-status {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  min-height: 1.2em;
  text-align: center;
  border-radius: var(--radius-md);
  padding: 0;
  transition: all var(--t-base);
}

.form-status--success {
  color: var(--teal-light);
  background: rgba(0, 180, 180, 0.08);
  border: 1px solid var(--teal-dark);
  padding: 0.65rem 1rem;
}

.form-status--error {
  color: #ff8a8a;
  background: rgba(120, 0, 0, 0.12);
  border: 1px solid #7a0000;
  padding: 0.65rem 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-block: 1.75rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--t-fast);
}

.footer-nav a:hover {
  color: var(--teal-primary);
}

.back-top {
  width: 38px;
  height: 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base), transform var(--t-fast);
}

.back-top:hover {
  background: var(--teal-glow);
  border-color: var(--teal-primary);
  color: var(--teal-primary);
  transform: translateY(-2px);
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-tagline {
    margin-inline: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .orbit-container {
    width: 240px;
    height: 240px;
  }

  .orbit-1 { width: 100px; height: 100px; }
  .orbit-2 { width: 170px; height: 170px; }
  .orbit-3 { width: 234px; height: 234px; }
}

/* ============================================================
   RESPONSIVE — TABLET (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --space-3xl: 3.5rem; }

  .nav-links,
  .btn-hire { display: none; }

  .hamburger { display: flex; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-photo-wrap {
    max-width: 280px;
    margin-inline: auto;
  }

  /* Timeline — collapse to single column */
  .timeline::before { left: 1.5rem; }

  .timeline-item,
  .timeline-item.right {
    justify-content: flex-end;
    padding-right: 0;
    padding-left: 4rem;
  }

  .timeline-node {
    left: 1.5rem;
  }

  .timeline-item:not(.right) .timeline-card::after,
  .timeline-item.right .timeline-card::after {
    left: -18px;
    right: auto;
    border-left-color: transparent;
    border-right-color: var(--border-subtle);
  }

  .timeline-card {
    max-width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .footer-nav { justify-content: center; }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  :root { --space-3xl: 2.75rem; }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    max-width: 100%;
  }

  .hero-name {
    font-size: 2rem;
  }

  .orbit-container {
    width: 200px;
    height: 200px;
  }

  .orbit-1 { width: 80px;  height: 80px; }
  .orbit-2 { width: 140px; height: 140px; }
  .orbit-3 { width: 196px; height: 196px; }
}
