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

/* ================================================
   FÄRGPALETTER – för att byta palett, flytta
   "AKTIV" kommentaren till önskad palett och
   kommentera ut den andra med /* ... * /
   ================================================ */

/* --- PALETT 1: Guld & Navy --- */
/*
:root {
  --primary:        #FFC570;
  --primary-dark:   #e6a845;
  --secondary:      #547792;
  --accent:         #EFD2B0;
  --bg:             #0d1628;
  --bg-card:        #162040;
  --bg-card-hover:  #1c2a52;
  --bg-alt:         #0f1c30;
  --border:         rgba(255, 197, 112, 0.12);
  --text:           #EFD2B0;
  --text-muted:     rgba(239, 210, 176, 0.65);
  --text-dim:       rgba(239, 210, 176, 0.35);
  --glow:           0 0 40px rgba(255, 197, 112, 0.3);
  --blob-1:         #FFC570;
  --blob-2:         #1A3263;
  --blob-3:         #547792;
}
*/

/* --- PALETT 2: Ljusblå & Kräm (AKTIV) --- */
:root {
  --primary:        #AACDDC;
  --primary-dark:   #81A6C6;
  --secondary:      #D2C4B4;
  --accent:         #F3E3D0;
  --bg:             #0a1520;
  --bg-card:        #0f1e2e;
  --bg-card-hover:  #142438;
  --bg-alt:         #0c1a28;
  --border:         rgba(170, 205, 220, 0.12);
  --text:           #F3E3D0;
  --text-muted:     rgba(243, 227, 208, 0.65);
  --text-dim:       rgba(243, 227, 208, 0.35);
  --glow:           0 0 40px rgba(170, 205, 220, 0.3);
  --blob-1:         #AACDDC;
  --blob-2:         #81A6C6;
  --blob-3:         #D2C4B4;
}

/* Gemensamma värden (ändras inte vid palettbyte) */
:root {
  --shadow:         0 20px 60px rgba(0,0,0,0.6);
  --shadow-sm:      0 4px 20px rgba(0,0,0,0.4);
  --radius:         16px;
  --radius-sm:      10px;
  --font:           'Inter', system-ui, sans-serif;
  --font-display:   'Playfair Display', serif;
  --transition:     0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===================================
   SCROLLBAR
=================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--secondary));
  border-radius: 3px;
}

/* ===================================
   TYPOGRAPHY
=================================== */
h1, h2, h3 { line-height: 1.2; }
h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
h3 { font-size: 1.2rem; font-weight: 700; }
p { color: var(--text-muted); }
a { color: inherit; text-decoration: none; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===================================
   LAYOUT
=================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 7rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(255,197,112,0.1);
  border: 1px solid rgba(255,197,112,0.15);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section-header h2 {
  color: var(--text);
}

/* ===================================
   REVEAL ANIMATIONS
=================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   NAVIGATION
=================================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: var(--transition);
}

#navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  color: white !important;
  padding: 0.5rem 1.2rem !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--glow);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(170, 205, 220, 0.06);
  border: 1px solid rgba(170, 205, 220, 0.15);
  border-radius: 10px;
  padding: 0.25rem;
}

.lang-flag-btn {
  background: none;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0.4;
  display: flex;
  align-items: center;
  line-height: 0;
}

.lang-flag-btn:hover {
  opacity: 0.75;
}

.lang-flag-btn.active {
  opacity: 1;
  border-color: var(--primary);
  background: rgba(170, 205, 220, 0.12);
}

.lang-flag {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================================
   MOBILE MENU
=================================== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10,10,15,0.97);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu ul {
  list-style: none;
  text-align: center;
}

.mobile-menu ul li {
  margin: 1rem 0;
}

.mobile-link {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  transition: var(--transition);
}

.mobile-link:hover { color: var(--primary); }

/* ===================================
   HERO
=================================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 2rem 4rem;
  gap: 4rem;
  flex-wrap: wrap;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: blobFloat 8s ease-in-out infinite;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: var(--blob-1);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: var(--blob-2);
  bottom: -150px;
  right: -150px;
  animation-delay: -3s;
  opacity: 0.25;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: var(--blob-3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -6s;
  opacity: 0.1;
}

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 15px) scale(0.97); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 6px #22c55e; }
  50% { box-shadow: 0 0 16px #22c55e, 0 0 30px rgba(34,197,94,0.3); }
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 2rem;
}

.cursor {
  animation: blink 1s step-end infinite;
  color: var(--primary);
  font-weight: 300;
}

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

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-scroll {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.scroll-dot {
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* Avatar */
.hero-avatar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-ring {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 3px;
  position: relative;
  flex-shrink: 0;
}

.avatar-ring::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px dashed rgba(255,197,112,0.2);
  animation: spin 20s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-card);
  overflow: hidden;
}

.avatar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.avatar-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.avatar-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.card-1 { bottom: 20px; left: -40px; }
.card-2 { bottom: 20px; right: -40px; }

.card-icon { font-size: 1.5rem; }

.gradient-icon {
  font-family: monospace;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.card-icon-code {
  font-size: 1.1rem;
}

.proj-icon {
  font-size: 2.8rem;
  line-height: 1;
}
.card-num { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.card-txt { font-size: 0.75rem; color: var(--text-muted); }

/* ===================================
   BUTTONS
=================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  font-family: var(--font);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 20px rgba(255,197,112,0.35);
}

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

.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ===================================
   ABOUT
=================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-lead {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.about-text p {
  margin-bottom: 1rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(255,197,112,0.1);
  border: 1px solid rgba(255,197,112,0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
}

.availability-note {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding: 1rem 1.2rem;
  background: rgba(170, 205, 220, 0.06);
  border: 1px solid rgba(170, 205, 220, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.availability-note strong { color: var(--primary); }
.avail-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }

.interests-note {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.interests-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.interests-note p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.avail-tz-note {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  opacity: 0.85;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: rgba(255,197,112,0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ===================================
   SKILLS
=================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: rgba(255,197,112,0.15);
  box-shadow: var(--shadow-sm);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.skill-cat-icon { font-size: 1.5rem; }

.skill-cat-header h3 {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.skill-bars { display: flex; flex-direction: column; gap: 1.2rem; }

.skill-bar-item { }

.skill-bar-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.skill-bar-info span:first-child { color: var(--text); font-weight: 500; }

.skill-pct {
  color: var(--primary) !important;
  font-weight: 700;
}

.skill-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.soft-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.soft-skill {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  transition: var(--transition);
}

.soft-skill:hover {
  color: var(--primary);
  border-color: rgba(255,197,112,0.2);
  background: rgba(255,197,112,0.08);
}

/* ===================================
   TIMELINE
=================================== */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--secondary), transparent);
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.timeline-marker {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 20px rgba(255,197,112,0.45);
  position: relative;
  flex-shrink: 0;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: rgba(255,197,112,0.2);
  transform: translateX(6px);
  box-shadow: var(--shadow-sm);
}

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

.timeline-header h3 { color: var(--text); font-size: 1.1rem; }

.timeline-link {
  color: var(--text);
  transition: color var(--transition);
}
.timeline-link:hover { color: var(--primary); }

.timeline-company {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.2rem;
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.timeline-tags span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(84,119,146,0.15);
  border: 1px solid rgba(84,119,146,0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

/* ===================================
   EDUCATION
=================================== */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.edu-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 900px;
  margin: 0 auto;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  gap: 1.2rem;
  transition: var(--transition);
}

.edu-card:hover {
  border-color: rgba(255,197,112,0.2);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.edu-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.edu-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.edu-content h3 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.edu-school {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.7rem;
}

.edu-desc {
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.edu-grade {
  font-size: 0.8rem;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  display: inline-block;
}

/* ===================================
   PROJECTS
=================================== */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: rgba(255,197,112,0.2);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.project-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.project-img {
  position: relative;
  overflow: hidden;
}

.project-card.featured .project-img {
  min-height: 280px;
}

.project-card:not(.featured) .project-img {
  min-height: 180px;
}

.project-placeholder {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.project-1 { background: linear-gradient(135deg, rgba(255,197,112,0.18), rgba(26,50,99,0.5)); }
.project-2 { background: linear-gradient(135deg, rgba(84,119,146,0.2), rgba(255,197,112,0.15)); }
.project-3 { background: linear-gradient(135deg, rgba(255,197,112,0.15), rgba(84,119,146,0.2)); }
.project-4 { background: linear-gradient(135deg, rgba(170,205,220,0.2), rgba(84,119,146,0.25)); }
.project-5 { background: linear-gradient(135deg, rgba(84,119,146,0.25), rgba(170,205,220,0.15)); }

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay { opacity: 1; }

.project-link {
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.project-link:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
}

.project-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.project-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-info h3 {
  color: var(--text);
  font-size: 1.2rem;
}

.project-info p {
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.project-stack span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary);
  background: rgba(84,119,146,0.12);
  border: 1px solid rgba(84,119,146,0.2);
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
}

/* ===================================
   CONTACT
=================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-lead {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}

a.contact-item:hover {
  border-color: rgba(255,197,112,0.2);
  transform: translateX(4px);
}

.contact-icon { font-size: 1rem; font-weight: 800; flex-shrink: 0; width: 2rem; text-align: center; }

.contact-item-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.contact-item-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

.social-btn:hover {
  color: var(--text);
  border-color: rgba(255,197,112,0.2);
  transform: translateY(-2px);
}

.social-btn-yt:hover {
  border-color: rgba(255, 0, 0, 0.4);
  color: #ff4444;
}

.social-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: white;
  background: #ff0000;
  padding: 0.15rem 0.45rem;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

/* Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  resize: none;
  outline: none;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 500px;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: rgba(255,197,112,0.05);
  box-shadow: 0 0 0 3px rgba(255,197,112,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-success {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4ade80;
}

/* ===================================
   FOOTER
=================================== */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

footer p { font-size: 0.88rem; color: var(--text-dim); }

.footer-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-top:hover { color: var(--primary); }

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 1024px) {
  .edu-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  #hero {
    flex-direction: column;
    text-align: center;
    padding-top: 6rem;
  }
  .hero-actions { justify-content: center; }
  .hero-desc { margin: 0 auto 2rem; }
  .hero-scroll { justify-content: center; }
  .hero-badge { margin: 0 auto 1.5rem; }
  .card-1 { left: -10px; }
  .card-2 { right: -10px; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .project-card.featured { grid-column: 1; grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .section { padding: 5rem 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: 1; grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .container { padding: 0 1.2rem; }
  .contact-form { padding: 1.5rem; }
  .avatar-ring { width: 240px; height: 240px; }
  .hero-name { font-size: 2.8rem; }
  .card-1, .card-2 { display: none; }
}

/* ===================================
   SELECTION
=================================== */
::selection {
  background: rgba(255,197,112,0.2);
  color: white;
}
