/* ============================================================
   MATHAUS HUBER PORTFOLIO — Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES — Light Mode (default)
   ============================================================ */
:root {
  --bg:            #ffffff;
  --bg-alt:        #f6f6fa;
  --card:          #f2f2f7;
  --card-hover:    #e9e9f4;
  --border:        #e2e2ec;
  --border-lit:    #d0d0e0;

  --accent:        #07a0f6;
  --accent-light:  #38b4f8;
  --accent-dim:    rgba(7, 160, 246, 0.09);
  --accent-glow:   rgba(7, 160, 246, 0.22);

  --secondary:     #512DA8;
  --secondary-dim: rgba(81, 45, 168, 0.07);

  --text:          #111118;
  --text-muted:    #55556a;
  --text-dim:      #9898b0;
  --white:         #ffffff;

  --nav-bg:        rgba(255, 255, 255, 0.92);
  --nav-bg-solid:  rgba(255, 255, 255, 0.98);

  --nav-height:    68px;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-xs:     6px;
  --shadow:        0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-md:     0 4px 24px rgba(0, 0, 0, 0.09);
  --shadow-lg:     0 12px 40px rgba(0, 0, 0, 0.13);
  --ease:          0.25s ease;
  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   DARK MODE OVERRIDES
   ============================================================ */
[data-theme="dark"] {
  --bg:            #0a0a10;
  --bg-alt:        #0f0f18;
  --card:          #141420;
  --card-hover:    #1a1a28;
  --border:        #1e1e2e;
  --border-lit:    #262638;

  --text:          #dde1ec;
  --text-muted:    #7b7b99;
  --text-dim:      #4b4b65;
  --white:         #ffffff;

  --nav-bg:        rgba(10, 10, 16, 0.90);
  --nav-bg-solid:  rgba(10, 10, 16, 0.98);

  --shadow:        0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-md:     0 6px 32px rgba(0, 0, 0, 0.55);
  --shadow-lg:     0 12px 48px rgba(0, 0, 0, 0.65);
}

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

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--ease); }
ul { list-style: none; padding: 0; margin: 0; }

a,
a:hover,
a:focus,
a:active {
  text-decoration: none !important;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--text);
}

h1 { font-size: clamp(2.8rem, 7vw, 5rem);     font-weight: 800; }
h2 { font-size: clamp(2rem,   4vw, 2.8rem);   font-weight: 800; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }

h5 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

p {
  color: var(--text-muted);
  line-height: 1.85;
  font-size: 0.97rem;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  background: var(--nav-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  padding: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
  background: var(--nav-bg-solid);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.045em;
  transition: color var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
  transition: transform 1s ease;
}

.nav-avatar:hover {
  transform: scale(1.25);
}

.nav-logo .dot { color: var(--accent); }
.nav-logo:hover { color: var(--accent); }

.navbar-collapse { justify-content: flex-end; }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.navbar-nav .nav-link {
  color: var(--text-muted) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem !important;
  border-radius: var(--radius-xs);
  transition: color var(--ease), background var(--ease);
}

.navbar-nav .nav-link:hover {
  color: var(--text) !important;
  background: var(--card);
}

.navbar-nav .nav-link.active {
  color: var(--accent) !important;
  background: var(--accent-dim);
  font-weight: 600;
}

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-lit);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--ease);
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }

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

/* Hamburger */
.navbar-toggler {
  border: 1px solid var(--border-lit);
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.6rem;
  background: transparent;
  transition: border-color var(--ease);
  line-height: 1;
}

.navbar-toggler:focus { box-shadow: none; outline: none; }
.navbar-toggler:hover { border-color: var(--accent); }
.navbar-toggler .fas { color: var(--text-muted); font-size: 0.95rem; }

@media (max-width: 767px) {
  .navbar-collapse {
    position: absolute;
    top: var(--nav-height);
    left: 1rem;
    right: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .navbar-nav { flex-direction: column; align-items: flex-start; gap: 0.15rem; width: 100%; }
  .navbar-nav .nav-link { width: 100%; display: block; }
}

/* ============================================================
   SECTION LAYOUT
   ============================================================ */
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }

.section-eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title-lg {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.section-description {
  font-size: 1.025rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 520px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  transition: all var(--ease);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-accent:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-lit);
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--ease);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-xs);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.82rem;
  transition: all var(--ease);
  cursor: pointer;
  text-decoration: none;
}

.btn-ghost:hover { color: var(--accent-light); background: var(--accent-dim); }

/* ============================================================
   TAGS
   ============================================================ */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 100px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(7, 160, 246, 0.18);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

[data-theme="dark"] .tag {
  color: var(--accent-light);
  border-color: rgba(7, 160, 246, 0.22);
}

/* ============================================================
   SOCIAL ICON BUTTONS
   ============================================================ */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-lit);
  border-radius: var(--radius-xs);
  color: var(--text-dim);
  font-size: 0.95rem;
  transition: all var(--ease);
  text-decoration: none;
}

.social-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 30%, var(--border) 70%, transparent 100%);
  border: none;
  margin: 0;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }
.reveal.delay-5 { transition-delay: 0.40s; }

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scrollDot {
  0%  { top: 4px;  opacity: 1; }
  80% { top: 16px; opacity: 0; }
  100%{ top: 4px;  opacity: 0; }
}

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

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

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

.footer-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.045em;
  display: block;
  margin-bottom: 0.85rem;
  text-decoration: none;
}

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

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.75;
  max-width: 240px;
  margin-bottom: 1.5rem;
}

.footer-col-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.footer-nav-list li + li { margin-top: 0.6rem; }

.footer-nav-list a {
  color: var(--text-dim);
  font-size: 0.875rem;
  transition: color var(--ease);
}

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

.footer-contact-info { display: flex; flex-direction: column; gap: 0.75rem; }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-dim);
  font-size: 0.875rem;
}

.footer-contact-item i { color: var(--accent); width: 14px; text-align: center; flex-shrink: 0; }

.footer-social-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.5rem; }

.footer-bottom {
  margin-top: 60px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-copy { font-size: 0.82rem; color: var(--text-dim); }
.footer-copy a { color: var(--accent); }
.footer-copy a:hover { color: var(--accent-light); }

/* ============================================================
   HOME PAGE — HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

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

/* Subtle dot grid texture */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0,0,0,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
}

[data-theme="dark"] .hero-bg::before {
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
}

/* Color wash */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 78% 50%, rgba(7,160,246,0.05) 0%, transparent 65%),
    radial-gradient(ellipse 35% 45% at 10% 65%, rgba(81,45,168,0.04) 0%, transparent 60%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 80px 0 96px;
}

/* Location / context eyebrow */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 1.75rem;
  animation: fadeInUp 0.6s ease both;
}

.hero-eyebrow-sep {
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--border-lit);
  flex-shrink: 0;
}

.hero-name {
  font-size: clamp(3rem, 7.5vw, 5.2rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.045em;
  color: var(--text);
  margin-bottom: 0.75rem;
  animation: fadeInUp 0.6s 0.1s ease both;
}

.hero-name .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.6s 0.18s ease both;
}

.hero-role .typed-text {
  color: var(--text);
  font-weight: 600;
}

.hero-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  border-radius: 1px;
  animation: blink 1s step-end infinite;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.85;
  max-width: 460px;
  margin-bottom: 2.25rem;
  animation: fadeInUp 0.6s 0.26s ease both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.6s 0.34s ease both;
}

.hero-socials {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s 0.42s ease both;
}

/* Photo column */
.hero-photo-col {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 2rem;
}

.hero-photo-frame {
  position: relative;
  display: inline-block;
  animation: fadeInUp 0.7s 0.2s ease both;
}

/* Decorative background block — unique, editorial */
.hero-photo-frame::before {
  content: '';
  position: absolute;
  top: 24px;
  right: -20px;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(7,160,246,0.12) 0%, rgba(81,45,168,0.10) 100%);
  z-index: 0;
}

.hero-photo-img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--border-lit);
  box-shadow: var(--shadow-lg);
  display: block;
  position: relative;
  z-index: 1;
}

/* Floating ring — single, subtle */
.hero-photo-ring {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  border: 1px solid rgba(7,160,246,0.14);
  z-index: 0;
  animation: float 7s ease-in-out infinite;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 1;
}

.scroll-mouse {
  width: 18px;
  height: 28px;
  border: 1.5px solid var(--border-lit);
  border-radius: 9px;
  position: relative;
}

.scroll-mouse::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 5px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDot 1.8s ease infinite;
}

/* ============================================================
   HOME PAGE — STATS
   ============================================================ */
#stats {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 44px 0;
}

.stats-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}

.stat-item {
  flex: 1;
  min-width: 130px;
  text-align: center;
  padding: 0.5rem 2rem;
  position: relative;
}

.stat-item + .stat-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: var(--border);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.3rem;
}

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

.stat-label {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   HOME PAGE — SKILLS PREVIEW
   ============================================================ */
#skills-preview { padding: 96px 0; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.75rem;
  margin-top: 3rem;
}

.skill-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  transition: all var(--ease);
}

.skill-card:hover {
  border-color: rgba(7,160,246,0.35);
  background: var(--card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.skill-card i { font-size: 1.6rem; color: var(--accent); }

.skill-card-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   HOME PAGE — RESPONSIVE
   ============================================================ */
@media (max-width: 991px) {
  .hero-inner { padding: 3rem 0 4rem; }
  .hero-photo-img { width: 240px; height: 240px; }
  .hero-description { max-width: 100%; }
  .hero-photo-col { margin-top: 3rem; justify-content: center; padding-right: 0; }
}

@media (max-width: 575px) {
  #hero { min-height: auto; padding-bottom: 3rem; }
  .hero-photo-img { width: 190px; height: 190px; }
  .stat-item { padding: 0.5rem 1rem; }
  .stat-number { font-size: 1.8rem; }
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .scroll-cue { display: none; }
  .navbar .container, .hero-description, .hero-cta {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero-name{
    text-align: center;
  }
  .hero-role, .hero-socials {
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: center;
  }
}

/* ============================================================
   INNER PAGE HERO
   ============================================================ */
.inner-hero {
  padding: calc(var(--nav-height) + 68px) 0 68px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.inner-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 70% at 85% 50%, rgba(7,160,246,0.05) 0%, transparent 65%);
  pointer-events: none;
}

[data-theme="dark"] .inner-hero::before {
  background: radial-gradient(ellipse 55% 70% at 85% 50%, rgba(7,160,246,0.07) 0%, transparent 65%);
}

.inner-hero .container { position: relative; z-index: 1; }

.inner-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(7,160,246,0.18);
  border-radius: 100px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.25rem;
}

.inner-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

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

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid var(--border-lit);
  margin: 0 auto 1.25rem;
}

.profile-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.profile-role-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(7,160,246,0.18);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.6rem;
}

.profile-location {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.profile-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.profile-actions .btn-accent,
.profile-actions .btn-outline {
  padding: 0.5rem 1.1rem;
  font-size: 0.8rem;
}

.profile-tags-section {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  text-align: left;
}

.profile-tags-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

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

/* About content */
.about-section { padding: 96px 0; }

.about-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
  font-weight: 400;
  margin-bottom: 1.25rem;
}

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

/* Skill area cards */
.skill-areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.skill-area-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}

.skill-area-card:hover {
  border-color: rgba(7,160,246,0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.skill-area-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.skill-area-icon {
  width: 34px;
  height: 34px;
  background: var(--accent-dim);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--accent);
  flex-shrink: 0;
}

.skill-area-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

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

/* kept for backwards compatibility */
.skill-area-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.7; }

/* ============================================================
   ABOUT PAGE — EXPERIENCE / TIMELINE
   ============================================================ */
.experience-section {
  padding: 96px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.timeline-scroll-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.timeline {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1.25rem 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.timeline::-webkit-scrollbar { display: none; }

.timeline-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  min-width: 175px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--ease);
}

.timeline-item:hover,
.timeline-item.selected {
  border-color: rgba(7,160,246,0.4);
  background: var(--accent-dim);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.timeline-item .title {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.timeline-item img {
  width: 100px;
  height: 52px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
  opacity: 0.75;
}

[data-theme="dark"] .timeline-item img {
  filter: brightness(0.85) saturate(0.8);
  opacity: 1;
}

/* Maker Market uses a black SVG logo — invert it in dark mode */
[data-theme="dark"] .timeline-item img.mm-logo {
  filter: invert(1) brightness(0.88);
  opacity: 1;
}

.timeline-item .date { font-size: 0.73rem; color: var(--text-dim); font-weight: 500; }

.timeline-nav-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
  flex-shrink: 0;
}

.timeline-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.description-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.75rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  min-height: 80px;
}

/* Structured HTML inside description-box (used by makermarket) */
.description-box .desc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 1rem;
}

.description-box .desc-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.description-box .desc-list li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: 1.1rem;
  position: relative;
}

.description-box .desc-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 600;
}

.description-box .desc-stack {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

/* About page responsive */
@media (max-width: 991px) {
  .profile-card { position: relative; top: 0; margin-bottom: 3rem; }
  .skill-areas-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 575px) {
  .skill-areas-grid { grid-template-columns: 1fr; }
  .timeline-nav-btn { display: none; }
}

/* ============================================================
   PROJECTS PAGE
   ============================================================ */
.projects-list { margin-top: 3rem; }

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease);
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.project-card:hover {
  border-color: rgba(7,160,246,0.3);
  box-shadow: var(--shadow-lg);
}

.project-carousel-wrap {
  position: relative;
  border-bottom: 1px solid var(--border);
}

.project-carousel-wrap .carousel-inner img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center top;
}

.project-carousel-wrap .carousel-control-prev,
.project-carousel-wrap .carousel-control-next { width: 8%; }

.project-content { padding: 2rem 2.5rem; }

.project-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 2.5rem;
  align-items: start;
}

.project-number {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.project-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
}

.project-tagline {
  font-size: 0.97rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.project-tags-row  { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.project-links-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

/* Expandable */
.project-expand-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color var(--ease);
}

.project-expand-btn:hover { color: var(--accent); }
.project-expand-btn i { transition: transform var(--ease); font-size: 0.8rem; }
.project-expand-btn.open i { transform: rotate(180deg); }

.project-details {
  display: none;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.project-details.open { display: block; }
.project-details p { font-size: 0.9rem; margin-bottom: 0.85rem; }
.project-details h4 { color: var(--text); font-size: 0.95rem; margin: 1rem 0 0.5rem; }

/* Project sidebar */
.project-sidebar-title {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
}

.project-meta-list { display: flex; flex-direction: column; gap: 0; }

.project-meta-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.project-meta-item:last-child { border-bottom: none; }

.project-meta-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.project-meta-value { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }

@media (max-width: 767px) {
  .project-layout { grid-template-columns: 1fr; }
  .project-content { padding: 1.5rem; }
  .project-carousel-wrap .carousel-inner img { height: 240px; }
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.contact-info-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

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

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

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-dim);
  border: 1px solid rgba(7,160,246,0.18);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.contact-detail-label {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
}

.contact-detail-value { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }
.contact-detail-value a { color: var(--text-muted); transition: color var(--ease); }
.contact-detail-value a:hover { color: var(--accent); }

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

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

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

.form-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.form-control-custom,
.form-textarea-custom {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 0.7rem 1rem;
  width: 100%;
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
}

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

.form-control-custom:focus,
.form-textarea-custom:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(7,160,246,0.1);
}

.form-textarea-custom { min-height: 130px; resize: vertical; }

.form-submit {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
  padding: 0.85rem 1.6rem;
}

@media (max-width: 991px) {
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   ABOUT PAGE — EDUCATION & LANGUAGES
   ============================================================ */
.edu-lang-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

/* Education list */
.edu-list {
  display: flex;
  flex-direction: column;
}

.edu-item {
  position: relative;
  padding: 1.75rem 0 1.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.edu-item:first-child { padding-top: 0; }
.edu-item:last-child  { border-bottom: none; padding-bottom: 0; }

/* Vertical timeline line */
.edu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: var(--border-lit);
  border-radius: 2px;
}

/* Current item (first) gets accent color on the line */
.edu-item:first-child::before {
  background: var(--accent);
}

.edu-period {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.edu-degree {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.edu-school {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.6rem;
}

.edu-desc {
  font-size: 0.875rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin: 0;
}

/* Language cards */
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.lang-item:hover {
  border-color: rgba(7, 160, 246, 0.25);
  box-shadow: var(--shadow);
}

.lang-flag {
  font-size: 1.55rem;
  line-height: 1;
  flex-shrink: 0;
}

.lang-info { flex: 1; min-width: 0; }

.lang-name {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.1rem;
  line-height: 1.3;
}

.lang-level {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.lang-cert {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0.2rem 0 0;
  line-height: 1.4;
}

.lang-badge {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.6rem;
  border-radius: 100px;
  background: var(--card);
  color: var(--text-dim);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-badge-c1 {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(7, 160, 246, 0.2);
}

[data-theme="dark"] .lang-badge-c1 {
  color: var(--accent-light);
}

/* ============================================================
   ABOUT PAGE — CODE CARD
   ============================================================ */
.code-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--card);
}

.code-card-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.code-dot-red    { background: #ff5f57; }
.code-dot-yellow { background: #ffbd2e; }
.code-dot-green  { background: #28c940; }

.code-card-filename {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-left: auto;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
}

.code-card-body {
  padding: 1.5rem 1.75rem;
}

.code-block {
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  margin: 0;
  white-space: pre;
  overflow-x: auto;
}

/* Syntax colours */
.c-cmt  { color: var(--text-dim); }
.c-kw   { color: var(--secondary); font-style: italic; }
.c-var  { color: var(--text); }
.c-key  { color: var(--text-muted); }
.c-str  { color: var(--accent); }

[data-theme="dark"] .c-kw { color: #a78bfa; }

/* ============================================================
   GLOBAL RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .section { padding: 48px 0; }
}
