/* =========================================================
   R Ajith Kumar — Portfolio
   Classic layout structure, modern visual language
   ========================================================= */

:root {
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Light theme */
  --bg: #f7f5f2;
  --bg-alt: #efece6;
  --surface: #ffffff;
  --surface-2: #fbfaf8;
  --border: rgba(20, 20, 20, 0.09);
  --text: #17181c;
  --text-muted: #56585f;
  --text-faint: #8b8d93;

  --accent: #c8622c;       /* burnt sienna — classic, warm */
  --accent-2: #1f6f5c;     /* deep teal */
  --accent-soft: rgba(200, 98, 44, 0.12);
  --accent-2-soft: rgba(31, 111, 92, 0.12);

  --shadow-sm: 0 2px 8px rgba(20,20,20,0.05);
  --shadow-md: 0 12px 32px rgba(20,20,20,0.08);
  --shadow-lg: 0 24px 60px rgba(20,20,20,0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --nav-h: 76px;
  --transition: 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

[data-theme="dark"] {
  --bg: #0e0f12;
  --bg-alt: #131418;
  --surface: #17181d;
  --surface-2: #1c1d23;
  --border: rgba(255,255,255,0.08);
  --text: #f1f1f0;
  --text-muted: #a4a6ad;
  --text-faint: #6b6d74;

  --accent: #e2843f;
  --accent-2: #38b897;
  --accent-soft: rgba(226, 132, 63, 0.14);
  --accent-2-soft: rgba(56, 184, 151, 0.14);

  --shadow-sm: 0 2px 10px rgba(0,0,0,0.3);
  --shadow-md: 0 16px 40px rgba(0,0,0,0.4);
  --shadow-lg: 0 30px 70px rgba(0,0,0,0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f12;
    --bg-alt: #131418;
    --surface: #17181d;
    --surface-2: #1c1d23;
    --border: rgba(255,255,255,0.08);
    --text: #f1f1f0;
    --text-muted: #a4a6ad;
    --text-faint: #6b6d74;

    --accent: #e2843f;
    --accent-2: #38b897;
    --accent-soft: rgba(226, 132, 63, 0.14);
    --accent-2-soft: rgba(56, 184, 151, 0.14);

    --shadow-sm: 0 2px 10px rgba(0,0,0,0.3);
    --shadow-md: 0 16px 40px rgba(0,0,0,0.4);
    --shadow-lg: 0 30px 70px rgba(0,0,0,0.55);
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  cursor: default;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

::selection { background: var(--accent); color: #fff; }

/* Custom cursor (desktop only) */
.cursor-dot, .cursor-outline {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  display: none;
  opacity: 0;
}
.cursor-dot { width: 6px; height: 6px; background: var(--accent); }
.cursor-outline {
  width: 34px; height: 34px;
  border: 1.5px solid var(--accent);
  transition: width .2s, height .2s, opacity .2s;
}
.cursor-dot.active, .cursor-outline.active { opacity: 0.5; }
.cursor-dot.active { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .cursor-dot, .cursor-outline { display: block; }
}

/* Scroll progress bar */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 10000;
  transition: width 0.1s linear;
}

/* Preloader */
.preloader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 20000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-content { text-align: center; }
.preloader-logo {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  display: block;
  margin-bottom: 18px;
}
.preloader-bar {
  width: 160px; height: 3px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.preloader-fill {
  width: 0%; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: fillBar 1.2s ease forwards;
}
@keyframes fillBar { to { width: 100%; } }

/* Background FX */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 70%);
  opacity: 0.5;
  z-index: 0;
  pointer-events: none;
}
.bg-glow {
  position: fixed;
  width: 640px; height: 640px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}
.bg-glow-1 { background: var(--accent); top: -200px; right: -160px; }
.bg-glow-2 { background: var(--accent-2); bottom: 10%; left: -220px; }

main, header, footer { position: relative; z-index: 1; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-primary i { transition: transform 0.3s; }
.btn-primary:hover i { transform: translateX(4px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* =========================================================
   Navbar
   ========================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition), height var(--transition), backdrop-filter var(--transition);
}
.navbar.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: var(--shadow-sm);
  height: 68px;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
}

.nav-links {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}
.nav-link {
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--bg); background: var(--text); }

.navbar-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.theme-toggle i { position: absolute; font-size: 0.95rem; transition: transform 0.4s, opacity 0.4s; }
.theme-toggle .fa-sun { opacity: 1; transform: rotate(0) scale(1); color: var(--accent); }
.theme-toggle .fa-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle .fa-sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="dark"] .theme-toggle .fa-moon { opacity: 1; transform: rotate(0) scale(1); color: var(--accent-2); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
}
.hamburger span {
  width: 20px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.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); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 60px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.dot-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3fb950;
  box-shadow: 0 0 0 0 rgba(63,185,80,0.6);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(63,185,80,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(63,185,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,185,80,0); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 24px;
}
.hero-title > span:first-child { font-size: 0.5em; font-weight: 500; color: var(--text-muted); font-family: var(--font-body); }
.hero-name {
  background: linear-gradient(100deg, var(--text) 30%, var(--accent) 60%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-typed {
  font-size: 0.5em;
  color: var(--text-muted);
  font-weight: 500;
  min-height: 1.4em;
}
.cursor-blink { animation: blink 0.9s infinite; color: var(--accent); font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  max-width: 560px;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 34px;
}
.hero-desc strong { color: var(--text); font-weight: 600; }

.hero-cta { display: flex; gap: 14px; margin-bottom: 36px; flex-wrap: wrap; }

.hero-socials { display: flex; gap: 12px; margin-bottom: 44px; }
.hero-socials a {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.hero-socials a:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  transform: translateY(-4px) rotate(-6deg);
}

.hero-stats { display: flex; gap: 40px; }
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  display: inline;
}
.stat-plus { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.82rem; color: var(--text-faint); margin-top: 2px; }

/* Hero visual */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-photo-wrap {
  position: relative;
  width: 380px; height: 380px;
  display: flex; align-items: center; justify-content: center;
}
.hero-photo-ring {
  position: absolute;
  inset: -14px;
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  border: 1.5px dashed var(--border);
  animation: rotateRing 30s linear infinite;
}
@keyframes rotateRing { to { transform: rotate(360deg); } }

.hero-photo-glow {
  position: absolute;
  inset: 20px;
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: blur(40px);
  opacity: 0.35;
}

.hero-photo {
  position: relative;
  width: 320px; height: 320px;
  object-fit: cover;
  border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%;
  border: 4px solid var(--surface);
  box-shadow: var(--shadow-lg);
  animation: morphShape 10s ease-in-out infinite;
}
@keyframes morphShape {
  0%, 100% { border-radius: 40% 60% 55% 45% / 45% 40% 60% 55%; }
  50% { border-radius: 55% 45% 40% 60% / 40% 55% 45% 60%; }
}

.floating-chip {
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: floatChip 4s ease-in-out infinite;
}
.floating-chip i { color: var(--accent); }
.chip-1 { top: 10px; left: -30px; animation-delay: 0s; }
.chip-2 { bottom: 60px; right: -40px; animation-delay: 1.3s; }
.chip-3 { bottom: -10px; left: 20px; animation-delay: 2.6s; }
@keyframes floatChip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* =========================================================
   Reveal animation base states (GSAP toggles .in-view)
   ========================================================= */
.reveal-up { opacity: 0; transform: translateY(36px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16,1,0.3,1); transition-delay: calc(var(--d, 0) * 0.09s); }
.reveal-up.in-view { opacity: 1; transform: translateY(0); }
.reveal-scale { opacity: 0; transform: scale(0.88); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16,1,0.3,1); }
.reveal-scale.in-view { opacity: 1; transform: scale(1); }

/* =========================================================
   Sections (generic)
   ========================================================= */
.section { padding: 130px 0; position: relative; }
.section-alt { background: var(--bg-alt); }

.section-tag {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 64px;
  max-width: 700px;
}
.accent { color: var(--accent); }

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 56px;
  align-items: start;
}
.about-text p { color: var(--text-muted); margin-bottom: 20px; font-size: 1.02rem; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.highlight-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--transition), border-color var(--transition);
}
.highlight-item:hover { transform: translateY(-4px); border-color: var(--accent); }
.highlight-item i { font-size: 1.1rem; color: var(--accent); width: 22px; }
.highlight-item strong { display: block; font-size: 0.85rem; }
.highlight-item span { display: block; font-size: 0.8rem; color: var(--text-muted); }

.about-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.card-glow {
  position: absolute;
  width: 200px; height: 200px;
  background: var(--accent);
  filter: blur(90px);
  opacity: 0.2;
  top: -60px; right: -60px;
}
.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  position: relative;
}
.about-card h3 i { color: var(--accent); }
.about-card > p { color: var(--text-muted); font-size: 0.95rem; position: relative; }
.divider { height: 1px; background: var(--border); margin: 26px 0; }
.award-list { display: flex; flex-direction: column; gap: 12px; position: relative; }
.award-list li { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; color: var(--text-muted); }
.award-list i { color: var(--accent); font-size: 0.8rem; }

/* =========================================================
   Skills
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.skill-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.skill-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.skill-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 18px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list-sm { margin: 14px 0; }
.tag {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.tag:hover { color: var(--accent); border-color: var(--accent); }

.progress-list { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.progress-row { display: grid; grid-template-columns: 100px 1fr; align-items: center; gap: 12px; font-size: 0.82rem; color: var(--text-muted); }
.progress-track { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px;
  transition: width 1.4s cubic-bezier(0.16,1,0.3,1);
}

/* =========================================================
   Experience Timeline
   ========================================================= */
.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline-line {
  position: absolute;
  left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--border), var(--border));
  background-image: repeating-linear-gradient(to bottom, var(--border) 0 6px, transparent 6px 12px);
}
.timeline-item { position: relative; padding-left: 46px; margin-bottom: 44px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: 0; top: 6px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}
.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.timeline-card:hover { transform: translateX(6px); box-shadow: var(--shadow-md); }
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 14px;
}
.timeline-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 6px; }
.company { color: var(--text); }
.timeline-role { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 14px; }
.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-2);
  background: var(--accent-2-soft);
  padding: 6px 14px;
  border-radius: 100px;
}

.sub-project {
  position: relative;
  margin-top: 26px;
  padding: 22px 0 0 22px;
  border-left: 2px solid var(--border);
}
.sub-project:first-of-type { margin-top: 22px; }
.sub-project::before {
  content: '';
  position: absolute;
  left: -6px; top: 28px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent-2);
}
.sub-project-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 8px;
}
.sub-project-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}
.sub-project-role { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 4px; }
.sub-project .tag-list-sm { margin: 14px 0; }
.timeline-list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.timeline-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.timeline-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--accent-2);
  transform: rotate(45deg);
}

/* =========================================================
   Education
   ========================================================= */
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.edu-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.edu-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-2-soft);
  color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.edu-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.edu-card h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 8px 0; }
.edu-card > p { color: var(--text-muted); font-size: 0.92rem; }
.cert-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.cert-list li { display: flex; gap: 10px; font-size: 0.88rem; color: var(--text-muted); align-items: flex-start; }
.cert-list i { color: var(--accent-2); font-size: 0.75rem; margin-top: 4px; }

/* =========================================================
   Contact
   ========================================================= */
.contact-sub { color: var(--text-muted); max-width: 560px; margin-top: -40px; margin-bottom: 60px; font-size: 1.02rem; }

.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-item {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--transition), border-color var(--transition);
}
.contact-item:hover { transform: translateX(6px); border-color: var(--accent); }
.contact-item-static:hover { transform: none; border-color: var(--border); }
.contact-item-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-item span { display: block; font-size: 0.78rem; color: var(--text-faint); }
.contact-item strong { display: block; font-size: 0.92rem; font-weight: 600; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex; flex-direction: column; gap: 22px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-group { position: relative; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 14px 4px 10px;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  resize: none;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group label {
  position: absolute;
  left: 4px; top: 14px;
  color: var(--text-faint);
  font-size: 0.95rem;
  pointer-events: none;
  transition: all var(--transition);
}
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -4px;
  font-size: 0.75rem;
  color: var(--accent);
}
.form-note { font-size: 0.78rem; color: var(--text-faint); text-align: center; }

/* =========================================================
   Footer
   ========================================================= */
.footer { padding: 60px 0 36px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-tag { color: var(--text-muted); font-size: 0.9rem; }
.footer-copy { color: var(--text-faint); font-size: 0.8rem; margin-top: 10px; }

.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition);
  z-index: 900;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); background: var(--accent); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-photo-wrap { width: 280px; height: 280px; }
  .hero-photo { width: 240px; height: 240px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .edu-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 78px; left: 16px; right: 16px;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-16px) scale(0.98);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }
  .nav-links.open { transform: translateY(0) scale(1); opacity: 1; visibility: visible; }
  .nav-link { text-align: center; padding: 12px; }
  .nav-link.active { background: var(--accent-soft); color: var(--accent); }
  .hamburger { display: flex; }
  .nav-resume { display: none; }
  .about-highlights { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .section { padding: 90px 0; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-socials { flex-wrap: wrap; }
  .floating-chip { display: none; }
  .hero-photo-wrap { width: 220px; height: 220px; }
  .hero-photo { width: 190px; height: 190px; }
  .timeline-card { padding: 22px 20px; }
  .brand-text { display: none; }
}

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