/* ==========================================================================
   PORTFOLIO DESIGN SYSTEM - APPLE MINIMALIST AESTHETIC
   Engineered for: Nafian (Full-Stack Software Engineer)
   ========================================================================== */

:root {
  /* Dark Mode Default (Apple Obsidian/Charcoal) */
  --bg-primary: #050507;
  --bg-secondary: #0c0d10;
  --bg-card: rgba(22, 23, 27, 0.75);
  --bg-card-hover: rgba(30, 32, 38, 0.85);
  --bg-glass: rgba(18, 19, 23, 0.65);
  --bg-elevated: #1a1b22;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.18);
  --border-active: rgba(0, 113, 227, 0.5);

  --text-primary: #f5f5f7;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  
  --accent-apple: #2997ff;
  --accent-glow: rgba(41, 151, 255, 0.25);
  --accent-secondary: #5e5ce6;
  --accent-emerald: #30d158;
  --accent-warning: #ffd60a;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 50px rgba(41, 151, 255, 0.15);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, Monaco, monospace;
}

[data-theme="light"] {
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(245, 245, 247, 0.75);
  --bg-elevated: #e5e5ea;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(0, 0, 0, 0.15);
  --border-active: rgba(0, 113, 227, 0.6);

  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;

  --accent-apple: #0071e3;
  --accent-glow: rgba(0, 113, 227, 0.2);
  --accent-secondary: #4848aa;
  --accent-emerald: #248a3d;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 40px rgba(0, 113, 227, 0.1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Background Ambient Lighting */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.35;
  transition: transform 0.8s ease-out;
}

.glow-orb-1 {
  top: -10%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-apple) 0%, transparent 70%);
}

.glow-orb-2 {
  top: 40%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  opacity: 0.22;
}

.glow-orb-3 {
  bottom: 5%;
  left: 10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, #38bdf8 0%, transparent 70%);
  opacity: 0.15;
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-apple), #38bdf8, var(--accent-secondary));
  z-index: 1000;
  width: 0%;
  transition: width 0.1s linear;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section-wrapper {
  padding: 6rem 0;
  position: relative;
}

@media (min-width: 768px) {
  .section-wrapper {
    padding: 8.5rem 0;
  }
}

/* Typography Helpers */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-apple);
  backdrop-filter: blur(12px);
  margin-bottom: 1.25rem;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-title .text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-tertiary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   FLOATING NAVBAR (Apple Dynamic Island Style)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 1.25rem;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-subtle);
  padding: 0.55rem 0.85rem 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  max-width: 900px;
  width: 100%;
  transition: all var(--transition-base);
}

.nav-container.scrolled {
  border-color: var(--border-highlight);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-brand-badge {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent-apple), var(--accent-secondary));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 800;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

@media (min-width: 820px) {
  .nav-links {
    display: flex;
  }
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
  background: rgba(0, 0, 0, 0.05);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  background: var(--text-primary);
  color: var(--bg-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .nav-cta:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
  display: flex;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.4rem;
  align-items: center;
  justify-content: center;
}

@media (min-width: 820px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-menu-overlay {
  position: fixed;
  top: 5rem;
  left: 1rem;
  right: 1rem;
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  z-index: 899;
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
  opacity: 0;
  transition: all var(--transition-base);
}

.mobile-menu-overlay.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 7.5rem;
  padding-bottom: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.25fr 1fr;
    gap: 4rem;
  }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1.05rem;
  background: rgba(48, 209, 88, 0.08);
  border: 1px solid rgba(48, 209, 88, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  opacity: 0.5;
  animation: pulse 2s infinite ease-out;
}

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

.hero-title {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #ffffff 15%, var(--accent-apple) 60%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title .gradient-text {
  background: linear-gradient(135deg, #1d1d1f 20%, #0071e3 70%, #5e5ce6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-bio {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 2.2rem;
}

.hero-bio strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  transform: translateY(-2px);
}

/* Hero Key Stats */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--border-subtle);
  max-width: 540px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-number span {
  color: var(--accent-apple);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  font-weight: 500;
}

/* Hero Visual / Avatar Showcase */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-card-wrapper {
  position: relative;
  width: 100%;
  max-width: 440px;
}

.avatar-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  aspect-ratio: 1 / 1;
  transition: transform var(--transition-smooth);
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.avatar-frame:hover img {
  transform: scale(1.03);
}

/* Floating Badges on Hero Visual */
.floating-badge {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.1rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
  animation: float 4s ease-in-out infinite;
}

.badge-top-left {
  top: -1.2rem;
  left: -1.2rem;
}

.badge-bottom-right {
  bottom: -1.5rem;
  right: -1rem;
  animation-delay: 2s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.badge-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(41, 151, 255, 0.12);
  color: var(--accent-apple);
}

.badge-text-title {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.badge-text-val {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   ABOUT / PHILOSOPHY (Apple Bento Grid Style)
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(12, 1fr);
  }
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  backdrop-filter: blur(16px);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.bento-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.bento-card:hover::before {
  opacity: 1;
}

.bento-col-8 {
  grid-column: span 12;
}

.bento-col-4 {
  grid-column: span 12;
}

.bento-col-6 {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .bento-col-8 { grid-column: span 8; }
  .bento-col-4 { grid-column: span 4; }
  .bento-col-6 { grid-column: span 6; }
}

.card-icon-header {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(41, 151, 255, 0.1);
  color: var(--accent-apple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.bento-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.bento-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Interactive Terminal Box */
.terminal-window {
  background: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 1.5rem;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.terminal-header {
  background: #111114;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: #ff5f56; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #27c93f; }

.terminal-title {
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.terminal-body {
  padding: 1.2rem;
  color: #e2e8f0;
  line-height: 1.7;
  overflow-x: auto;
}

.t-key { color: #38bdf8; }
.t-str { color: #a5f3fc; }
.t-bool { color: #f472b6; }
.t-num { color: #facc15; }

/* ==========================================================================
   EXPERIENCE SECTION (Apple Vertical Timeline)
   ========================================================================== */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-apple), rgba(255, 255, 255, 0.08));
}

.timeline-item {
  position: relative;
  margin-bottom: 3.5rem;
}

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

.timeline-marker {
  position: absolute;
  top: 6px;
  left: -2rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-apple);
  box-shadow: 0 0 10px var(--accent-glow);
  z-index: 2;
  transition: transform var(--transition-fast);
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.3);
  background: var(--accent-apple);
}

.experience-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(16px);
  transition: all var(--transition-base);
}

.experience-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.exp-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.exp-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.exp-company {
  color: var(--accent-apple);
  font-weight: 600;
  font-size: 0.95rem;
}

.exp-period {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.exp-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.exp-achievements {
  list-style: none;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.exp-achievements li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.exp-achievements li svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 3px;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.exp-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ==========================================================================
   SKILLS & EXPERTISE
   ========================================================================== */
.skills-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.skill-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.skill-tab-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

.skill-tab-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  backdrop-filter: blur(16px);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.skill-card:hover {
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.skill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.skill-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.skill-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent-apple);
}

.skill-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.skill-level-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-apple);
  background: rgba(41, 151, 255, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.skill-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 1rem;
}

.skill-bar-progress {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-apple), #38bdf8);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

/* ==========================================================================
   PROJECTS SHOWCASE
   ========================================================================== */
.projects-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3.5rem;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

.filter-btn.active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  font-weight: 600;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(16px);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.project-thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #090a0d;
  overflow: hidden;
}

.project-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-thumb-box img {
  transform: scale(1.04);
}

.project-category-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.project-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.tech-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.project-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.project-link-btn:hover {
  color: var(--accent-apple);
}

.btn-details {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-details:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(20px);
}

@media (min-width: 900px) {
  .contact-container {
    grid-template-columns: 1fr 1.2fr;
    padding: 3.5rem;
    gap: 4rem;
  }
}

.contact-info-col h3 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.contact-info-col p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 2.5rem;
}

.contact-method-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.contact-method-card:hover {
  border-color: var(--border-highlight);
  background: rgba(255, 255, 255, 0.07);
}

.contact-method-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(41, 151, 255, 0.1);
  color: var(--accent-apple);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-method-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.contact-method-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.social-links-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

[data-theme="light"] .form-control {
  background: #ffffff;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-apple);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0;
  margin-top: 4rem;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    text-align: left;
  }
}

.footer-copy strong {
  color: var(--text-primary);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.back-to-top:hover {
  color: var(--text-primary);
  border-color: var(--border-highlight);
}

/* ==========================================================================
   MODAL & TOAST NOTIFICATION
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-dialog {
  background: var(--bg-secondary);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.modal-backdrop.open .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem 1.8rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.8rem;
}

/* Toast */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 1200;
  transform: translateY(120%);
  opacity: 0;
  transition: all var(--transition-base);
  pointer-events: none;
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Keyframe animations for scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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