/* ==========================================================================
   PERSONAL PORTFOLIO STYLESHEET
   Concept: Modern Editorial Minimalist, Glassmorphism & Executive Tech
   ========================================================================== */

/* 1. CSS Custom Properties (Variables) */
:root {
  /* Typography */
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Brand & Accent Colors */
  --accent-primary: #06b6d4;
  --accent-secondary: #3b82f6;
  --accent-tertiary: #6366f1;
  --accent-whatsapp: #10b981;
  --gradient-brand: linear-gradient(135deg, #06b6d4 0%, #3b82f6 55%, #6366f1 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(99, 102, 241, 0.14));

  /* Layout & Spacing */
  --container-max: 1180px;
  --navbar-height: 76px;
  --section-py: clamp(4.5rem, 8vw, 7rem);

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark Theme (Default) */
[data-theme="dark"] {
  --bg-primary: #070b14;
  --bg-secondary: #0c1220;
  --bg-card: rgba(16, 24, 41, 0.72);
  --bg-card-solid: #101829;
  --bg-navbar: rgba(7, 11, 20, 0.78);
  --bg-input: rgba(15, 23, 42, 0.85);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(56, 189, 248, 0.35);

  --shadow-card: 0 18px 40px -15px rgba(2, 6, 23, 0.75);
  --shadow-glow: 0 0 40px rgba(6, 182, 212, 0.2);
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f9fe;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-solid: #ffffff;
  --bg-navbar: rgba(248, 250, 252, 0.84);
  --bg-input: #ffffff;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-primary: #0284c7;
  --accent-secondary: #2563eb;

  --border-subtle: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(2, 132, 199, 0.35);

  --shadow-card: 0 16px 36px -14px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 0 35px rgba(2, 132, 199, 0.14);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input,
textarea {
  font-family: inherit;
  color: inherit;
}

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.section {
  position: relative;
  padding-block: var(--section-py);
  z-index: 1;
}

.section-alt {
  background-color: var(--bg-secondary);
  border-block: 1px solid var(--border-subtle);
}

/* 3. Page Loader & Ambient Background */
.page-loader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  display: grid;
  place-items: center;
  z-index: 9999;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  animation: spin 0.8s linear infinite;
}

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

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.24;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: var(--accent-primary);
  top: -120px;
  right: -80px;
}

.orb-2 {
  width: 380px;
  height: 380px;
  background: var(--accent-tertiary);
  bottom: 8%;
  left: -120px;
  animation-delay: -6s;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 80%);
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-30px, 40px) scale(1.08);
  }
}

/* 4. Typography Helpers & Section Headers */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-header {
  max-width: 680px;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  margin-bottom: 0.65rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.6vw, 2.65rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.edit-hint {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mono-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--gradient-subtle);
  color: var(--accent-primary);
  border: 1px solid var(--border-strong);
}

/* 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.45rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 10px 25px -8px rgba(6, 182, 212, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -8px rgba(6, 182, 212, 0.7);
}

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

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

.btn-whatsapp {
  width: 100%;
  background-color: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  color: #10b981;
  margin-top: 1.25rem;
}

.btn-whatsapp:hover {
  background-color: #10b981;
  color: #ffffff;
  transform: translateY(-2px);
}

/* 6. Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  height: var(--navbar-height);
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.navbar.scrolled {
  background-color: var(--bg-navbar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 8px 30px -12px rgba(2, 6, 23, 0.35);
}

.navbar-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-brand);
  color: #ffffff;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

.brand-dot {
  color: var(--accent-primary);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

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

.nav-link.active::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

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

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  cursor: pointer;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 7. Hero Section */
.hero {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.2vw, 4.1rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-role-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 600;
  margin-bottom: 1.25rem;
  min-height: 2rem;
}

.role-prefix {
  color: var(--text-secondary);
  font-weight: 500;
}

.typing-text {
  color: var(--accent-primary);
}

.typing-cursor {
  color: var(--accent-primary);
  animation: blink 0.9s steps(2, start) infinite;
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

.hero-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 58ch;
  margin-bottom: 2rem;
}

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

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.hero-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-pill {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: inline-grid;
  place-items: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-pill svg {
  width: 18px;
  height: 18px;
}

.social-pill:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* Portrait Showcase Frame (Tailored for Attached Photo Composition) */
.hero-visual {
  display: flex;
  justify-content: center;
}

.portrait-stage {
  position: relative;
  width: 100%;
  max-width: 390px;
  transition: transform 0.25s ease-out;
}

.portrait-glow {
  position: absolute;
  inset: -14px;
  border-radius: 30px;
  background: var(--gradient-brand);
  opacity: 0.26;
  filter: blur(26px);
  z-index: 0;
}

.portrait-ring {
  position: absolute;
  inset: -10px;
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  pointer-events: none;
  z-index: 2;
}

.portrait-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background-color: var(--bg-card-solid);
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-card);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Optimal focal framing: centers face, smile, GIS chest badge, and crossed arms cleanly */
  object-position: 50% 24%;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.portrait-stage:hover .portrait-img {
  transform: scale(1.04);
}

.floating-badge {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-navbar);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  animation: floatBadge 5s ease-in-out infinite alternate;
}

.badge-top {
  top: 18px;
  left: -22px;
}

.badge-bottom {
  bottom: 22px;
  right: -20px;
  animation-delay: -2.5s;
}

@keyframes floatBadge {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-7px);
  }
}

.badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-subtle);
  color: var(--accent-primary);
  display: grid;
  place-items: center;
}

.badge-icon svg {
  width: 18px;
  height: 18px;
}

.badge-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.badge-value {
  font-size: 0.86rem;
  font-weight: 700;
}

/* 8. About Section */
.about-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 4.5vw, 3.5rem);
  align-items: start;
}

.editorial-quote-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  margin-bottom: 1.25rem;
}

.quote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  color: var(--accent-primary);
}

.editorial-quote {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 1.35rem;
}

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

.quote-meta strong {
  display: block;
  font-size: 0.95rem;
}

.quote-meta span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.verified-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
}

.verified-chip svg {
  width: 14px;
  height: 14px;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.highlight-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.highlight-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.highlight-card svg {
  width: 22px;
  height: 22px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.highlight-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.highlight-card strong {
  font-size: 0.9rem;
}

.about-narrative h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin-bottom: 1rem;
}

.about-narrative p {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}

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

.about-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.value-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 500;
}

.value-tag svg {
  width: 15px;
  height: 15px;
  color: var(--accent-primary);
}

/* 9. Education Timeline */
.timeline {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
  padding-left: 2.25rem;
}

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

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

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

.timeline-marker {
  position: absolute;
  left: -2.25rem;
  top: 0.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 2px solid var(--accent-primary);
  color: var(--accent-primary);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 5px var(--bg-primary);
}

.timeline-marker svg {
  width: 15px;
  height: 15px;
}

.timeline-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.timeline-card:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
}

.timeline-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.timeline-badge {
  font-size: 0.76rem;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--gradient-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.timeline-subtitle {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.timeline-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.timeline-achievements {
  padding-left: 1.15rem;
  list-style: disc;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.timeline-achievements li {
  margin-bottom: 0.3rem;
}

/* 10. Skills Section */
.circular-skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.circular-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.1rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.circular-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.circular-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
}

.circular-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: var(--border-subtle);
  stroke-width: 8;
}

.circle-progress {
  fill: none;
  stroke: var(--accent-primary);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.circular-value {
  position: absolute;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
}

.circular-card h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin-bottom: 0.25rem;
}

.circular-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.skills-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.skill-category-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

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

.skill-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--gradient-subtle);
  border: 1px solid var(--border-strong);
  color: var(--accent-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.skill-cat-icon svg {
  width: 20px;
  height: 20px;
}

.skill-cat-header h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.skill-cat-header p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

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

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

.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-primary);
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: var(--radius-full);
  background-color: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  transition: width 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 11. Experience Section */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.exp-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.exp-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

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

.exp-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--gradient-subtle);
  color: var(--accent-primary);
}

.exp-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.exp-role {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.exp-org {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.9rem;
}

.exp-org svg {
  width: 15px;
  height: 15px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.exp-desc {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

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

.exp-tags span {
  font-size: 0.76rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background-color: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
}

/* 12. Projects Section */
.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2.25rem;
}

.filter-btn {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.filter-btn.active {
  background: var(--gradient-brand);
  border-color: transparent;
  color: #ffffff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.project-card.hidden-card {
  display: none;
}

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

.project-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #0b1222;
}

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

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

.project-cat-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: rgba(7, 11, 20, 0.82);
  color: #38bdf8;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.project-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.24rem;
  margin-bottom: 0.6rem;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.3rem;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--gradient-subtle);
  color: var(--accent-primary);
}

.project-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.btn-link svg {
  width: 17px;
  height: 17px;
  color: var(--accent-primary);
}

.btn-link:hover {
  color: var(--accent-primary);
  gap: 0.65rem;
}

/* 13. Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.contact-info-panel,
.contact-form-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-card);
}

.contact-info-panel h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.contact-intro {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background-color: rgba(148, 163, 184, 0.06);
  border: 1px solid transparent;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

a.contact-item:hover {
  border-color: var(--border-strong);
  transform: translateX(3px);
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--gradient-subtle);
  color: var(--accent-primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 19px;
  height: 19px;
}

.contact-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.contact-item strong {
  font-size: 0.94rem;
  word-break: break-word;
}

.contact-socials-box {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.contact-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.65rem;
}

.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.social-chip svg {
  width: 16px;
  height: 16px;
  color: var(--accent-primary);
}

.social-chip:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
}

/* Contact Form */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.required {
  color: #f43f5e;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.82rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-input);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.16);
}

.form-group input.invalid,
.form-group textarea.invalid {
  border-color: #f43f5e;
}

.error-msg {
  display: block;
  min-height: 1.1rem;
  margin-top: 0.3rem;
  font-size: 0.79rem;
  color: #fb7185;
}

.btn-submit {
  width: 100%;
}

.form-feedback {
  margin-top: 1.1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.55;
  border: 1px solid var(--border-strong);
  background: var(--gradient-subtle);
}

.form-feedback a {
  color: var(--accent-primary);
  text-decoration: underline;
  font-weight: 600;
}

/* 14. Footer & Back to Top */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding-block: 3rem 2.25rem;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--accent-primary);
}

.footer-socials {
  display: flex;
  gap: 0.65rem;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.footer-socials a svg {
  width: 17px;
  height: 17px;
}

.footer-socials a:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.footer-top-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.footer-top-link svg {
  width: 16px;
  height: 16px;
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  color: #ffffff;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all var(--transition-fast);
  z-index: 900;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* 15. Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1.25rem;
  z-index: 2000;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 540px;
  background-color: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.modal-year {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.modal-desc {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.modal-tech-box {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: var(--gradient-subtle);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.modal-tech-box p {
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* 16. Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* 17. Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .portrait-stage {
    max-width: 330px;
  }

  .circular-skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background-color: var(--bg-card-solid);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth), visibility var(--transition-smooth);
    box-shadow: var(--shadow-card);
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .nav-link {
    display: block;
    padding: 0.75rem 1rem;
  }

  .skills-categories-grid,
  .experience-grid,
  .projects-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .badge-top {
    left: -8px;
  }

  .badge-bottom {
    right: -8px;
  }
}

@media (max-width: 480px) {
  .about-highlights,
  .circular-skills-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

/* 18. Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

/* Print Style for CV Export */
@media print {
  .navbar,
  .ambient-bg,
  .hero-cta,
  .hero-socials,
  .project-filters,
  .contact-form-panel,
  .back-to-top,
  .modal-backdrop {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
