/* ============================================
   TOKENS & DESIGN SYSTEM
   Modeled after Harshit Sahu's Portfolio Aesthetic
============================================ */
:root {
  --bg: #090c10;
  --bg-elev: #10151d;
  --bg-elev-2: #171e28;
  --text: #edeff3;
  --text-muted: #8e9aaa;
  --text-faint: #59626f;
  --accent: #00d6a0;
  --accent-soft: rgba(0, 214, 160, 0.12);
  --accent-2: #ff9f45;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);

  --font-display: "Space Grotesk", "Arial", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1120px;
  --gap: clamp(1.5rem, 4vw, 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

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

ul { margin: 0; padding: 0; list-style: none; }

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

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

/* Subtle film-grain texture overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================
   NAVBAR
============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 12, 16, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(9, 12, 16, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.nav-mark span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); }

.nav-cta {
  font-size: 0.88rem;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-cta:hover, .nav-cta:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid rgba(0, 214, 160, 0.35);
  background: var(--accent-soft);
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

a.availability-pill:hover,
a.availability-pill:focus-visible {
  background: rgba(0, 214, 160, 0.2);
  border-color: rgba(0, 214, 160, 0.55);
}

.availability-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(0, 214, 160, 0.55);
  animation: pulseDot 2s ease-out infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(0, 214, 160, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(0, 214, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 214, 160, 0); }
}

/* Mobile Navigation Button & Drawer Component */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: all 0.25s ease;
  z-index: 101;
}

.mobile-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 214, 160, 0.3);
}

.hamburger-bar {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
}

.mobile-nav-toggle.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-nav-toggle.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-nav-toggle.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation Drawer */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0.35s ease, opacity 0.35s ease;
}

.mobile-nav-drawer.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 10, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  max-height: 90vh;
  background: linear-gradient(180deg, #10151f 0%, #090c10 100%);
  border-bottom: 1px solid rgba(0, 214, 160, 0.22);
  border-radius: 0 0 24px 24px;
  padding: 24px 20px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  overflow-y: auto;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.is-open .mobile-nav-content {
  transform: translateY(0);
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.mobile-nav-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.mobile-nav-brand span {
  color: var(--accent);
}

.mobile-nav-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-close:hover {
  background: rgba(255, 95, 86, 0.15);
  color: #ff5f56;
  border-color: rgba(255, 95, 86, 0.3);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: rgba(0, 214, 160, 0.08);
  border-color: rgba(0, 214, 160, 0.22);
  color: var(--accent);
}

.mobile-nav-idx {
  font-size: 0.72rem;
  font-family: monospace;
  color: var(--text-faint);
  margin-right: 12px;
}

.mobile-nav-arr {
  color: var(--accent);
  opacity: 0.5;
  font-size: 1.1rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav-link:hover .mobile-nav-arr {
  transform: translateX(3px);
  opacity: 1;
}

.mobile-nav-footer {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-avail-pill {
  align-self: flex-start;
  display: inline-flex !important;
}

.mobile-nav-actions {
  display: flex;
  gap: 10px;
}

.mobile-resume-btn,
.mobile-cta-btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  padding: 11px 16px;
}

@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .nav .availability-pill { display: none; }
  .nav-end .nav-cta { display: none; }
  .mobile-nav-toggle { display: flex; }
}

/* ============================================
   HERO STAGE (Apple-style layered visual)
============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 28px 48px;
  overflow: visible;
  box-sizing: border-box;
}

#mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.26;
}

.hero-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  min-height: 0;
  gap: 20px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 780px;
  margin: 16px auto 0;
  flex-shrink: 0;
  padding: 8px 12px 0;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.85rem, 6.5vw, 4.6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-top: calc(clamp(0.875rem, 1.2vw, 1rem) + 10px);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.15s forwards;
}

.hero-tagline {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.4vw, 2.125rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.28s forwards;
}

.hero-sub {
  margin: 16px auto 0;
  max-width: 620px;
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.6;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.4s forwards;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.52s forwards;
}

.hero-actions .btn {
  padding: 13px 26px;
  font-size: 0.95rem;
}

/* Watermark typography in hero */
.hero-wordmarks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4vw;
}

.hero-wordmark {
  position: absolute;
  font-family: var(--font-body);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 0.86;
  user-select: none;
  background: linear-gradient(
    115deg,
    #5a6570 0%,
    #d7dde5 22%,
    #7a8794 38%,
    #eef2f6 52%,
    #6b7785 68%,
    #c5ced8 82%,
    #4e5966 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
  animation: wordPulse 3.6s ease-in-out infinite;
  will-change: opacity, filter;
}

.hero-wordmark--main {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 92vw;
  max-width: 1400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 0.84;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  font-size: clamp(32px, 14vw, 220px);
  user-select: none;
  box-sizing: border-box;
  overflow: visible;
}

.hero-wordmark--main .wm-line {
  display: block;
  width: auto;
  max-width: 92vw;
  text-align: center;
  line-height: 0.84;
  letter-spacing: -0.05em;
  white-space: nowrap;
  box-sizing: border-box;
  overflow: visible;
}

@media (max-width: 768px) {
  .hero-wordmarks {
    padding: 0 2vw;
  }
  .hero-wordmark--main {
    top: 42%;
    width: 94vw;
    letter-spacing: -0.035em;
  }
  .hero-wordmark--main .wm-line {
    max-width: 94vw;
    letter-spacing: -0.035em;
  }
}

@media (max-width: 480px) {
  .hero-wordmark--main {
    top: 38%;
    width: 96vw;
    letter-spacing: -0.025em;
  }
  .hero-wordmark--main .wm-line {
    max-width: 96vw;
    letter-spacing: -0.025em;
  }
}

@keyframes wordPulse {
  0%, 100% {
    opacity: 0.20;
    filter: brightness(0.65) drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
  }
  50% {
    opacity: 0.45;
    filter: brightness(1.05) drop-shadow(0 14px 30px rgba(0, 214, 160, 0.12));
  }
}

/* Hero Visual & 3D Floating elements */
.hero-visual {
  position: relative;
  z-index: 1;
  margin: 12px auto 0;
  width: min(1100px, 100%);
  flex: 1 1 auto;
  min-height: 320px;
  display: grid;
  place-items: center;
  perspective: 1200px;
  opacity: 0;
  animation: rise 1s var(--ease) 0.35s forwards;
  padding: 20px 24px 24px;
  box-sizing: border-box;
}

.hero-product {
  position: relative;
  z-index: 2;
  width: min(640px, 86vw);
  transform-style: preserve-3d;
  will-change: transform;
  animation: heroFloat 5.5s ease-in-out infinite;
}

.hero-product-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.5));
}

.hero-float-card {
  position: absolute;
  z-index: 3;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background: rgba(10, 14, 18, 0.94);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  pointer-events: auto;
  opacity: 0.94;
  cursor: pointer;
  transition: transform 0.35s var(--ease), border-color 0.35s ease, box-shadow 0.35s ease;
}

.hero-float-card:hover {
  transform: scale(1.1) rotate(0deg) !important;
  border-color: var(--accent);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.75), 0 0 24px rgba(0, 214, 160, 0.3);
  z-index: 10;
}

.hero-float-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-float-card--arch {
  width: min(176px, 28vw);
  height: min(108px, 17vw);
  left: -8%;
  bottom: 8%;
  --r: -7deg;
  transform: rotate(var(--r));
  animation: heroFloatSoft 6.5s ease-in-out infinite;
}

.hero-float-card--stack {
  width: min(164px, 26vw);
  height: min(102px, 16vw);
  right: -6%;
  top: 6%;
  --r: 6deg;
  transform: rotate(var(--r));
  animation: heroFloatSoft 7.2s ease-in-out infinite reverse;
}

.hero-float-card--terraform {
  width: min(168px, 27vw);
  height: min(104px, 16.5vw);
  left: -6%;
  top: 4%;
  --r: 5deg;
  transform: rotate(var(--r));
  animation: heroFloatSoft 6.8s ease-in-out infinite;
  animation-delay: 0.4s;
}

.hero-float-card--k8s {
  width: min(160px, 25vw);
  height: min(100px, 16vw);
  right: -8%;
  bottom: 6%;
  --r: -6deg;
  transform: rotate(var(--r));
  animation: heroFloatSoft 7.6s ease-in-out infinite reverse;
  animation-delay: 0.7s;
}

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

@keyframes heroFloatSoft {
  0%, 100% { transform: translateY(0) rotate(var(--r, -8deg)); }
  50% { transform: translateY(-8px) rotate(var(--r, -8deg)); }
}

/* Hero Links row */
.hero-below {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  margin: 8px auto 0;
  flex-shrink: 0;
  padding: 0 4px 8px;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.7s forwards;
}

.hero-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.hero-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 29, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}

.hero-link-card:hover,
.hero-link-card:focus-visible {
  border-color: rgba(0, 214, 160, 0.4);
  background: rgba(23, 30, 40, 0.9);
  transform: translateY(-2px);
}

.hero-link-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(0, 214, 160, 0.22);
}

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

.hero-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.hero-link-label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.hero-link-value {
  font-size: 0.72rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 32px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.hero-scroll span {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--text-faint), transparent);
  position: relative;
  overflow: hidden;
}

.hero-scroll span::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollLine 2.2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { top: -100%; }
  60% { top: 100%; }
  100% { top: 100%; }
}

@media (max-width: 768px) {
  .hero-scroll { display: none; }
}

/* Marquee track */
.marquee {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  max-width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tool-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.92rem;
  white-space: nowrap;
}

.tool-badge img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: saturate(1.05);
}

/* ============================================
   WRITING & SHOWCASE SLIDER
============================================ */
.writing {
  position: relative;
  padding: 72px 0 80px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}

.writing-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 32px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.writing-slider {
  position: relative;
  margin: 0 auto;
  padding: 0 52px;
  width: 100%;
}

.writing-viewport {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.writing-viewport::-webkit-scrollbar { display: none; }

.writing-track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 4px calc((100vw - min(1120px, calc(100vw - 104px))) / 2) 12px;
}

.writing-card {
  flex: 0 0 auto;
  width: min(1120px, calc(100vw - 104px));
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  min-height: 340px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(9, 12, 16, 0.65);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.writing-card:hover,
.writing-card:focus-visible {
  border-color: rgba(0, 214, 160, 0.4);
  transform: translateY(-2px);
}

.writing-card-media {
  position: relative;
  min-height: 300px;
  background: #070a0e;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.writing-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

.writing-card:hover .writing-card-media img {
  transform: scale(1.06);
}

.writing-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 36px 32px;
}

.writing-card-tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-family: var(--font-display);
}

.writing-card-body h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: var(--text);
  line-height: 1.25;
}

.writing-card-body p {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.writing-card-cta {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--accent);
}

.writing-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(16, 21, 29, 0.95);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}

.writing-nav svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.writing-nav:hover,
.writing-nav:focus-visible {
  border-color: rgba(0, 214, 160, 0.45);
  color: var(--accent);
  background: rgba(9, 12, 16, 0.98);
}

.writing-nav--prev { left: 8px; }
.writing-nav--next { right: 8px; }

/* ============================================
   SECTIONS
============================================ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 130px 32px;
}

.section-head {
  max-width: 100%;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.35rem);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

/* ============================================
   ABOUT
============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--gap);
  align-items: start;
}

.about-photo {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  transition: transform 0.4s var(--ease), border-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5);
}

.about-photo:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 214, 160, 0.4);
  box-shadow: 0 20px 48px -10px rgba(0, 214, 160, 0.2);
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.about-photo:hover img {
  transform: scale(1.03);
}

.about-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(9, 12, 16, 0.88);
  backdrop-filter: blur(10px);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--accent);
  text-align: center;
  font-family: var(--font-display);
}

.about-copy h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin-bottom: 22px;
  max-width: 640px;
  line-height: 1.25;
}

.about-copy p {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 680px;
  margin-bottom: 18px;
}

.stat-row {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}

.stat-num, .stat-unit {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 700;
  color: var(--accent);
}

.stat p {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--text-muted);
  max-width: 16ch;
}

/* ============================================
   SKILLS GRID
============================================ */
.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.skill-card {
  background: var(--bg-elev);
  padding: 32px;
  transition: background 0.3s var(--ease);
}

.skill-card:hover { background: var(--bg-elev-2); }

.skill-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

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

.skill-card h3 {
  font-size: 1.05rem;
  margin-bottom: 18px;
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  color: var(--text-muted);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.chips span:hover {
  border-color: rgba(0, 214, 160, 0.4);
  color: var(--text);
}

.reveal.in .chips span {
  opacity: 1;
  transform: translateY(0);
}

.chips span img {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.chips--dark span {
  background: rgba(0, 0, 0, 0.3);
}

/* ============================================
   EXPERIENCE / TIMELINE
============================================ */
.timeline {
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.timeline::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  width: 2px;
  height: var(--tl-progress, 0%);
  background: var(--accent);
  transition: height 0.15s linear;
}

.tl-item {
  position: relative;
  padding-bottom: 64px;
}

.tl-item:last-child { padding-bottom: 0; }

.tl-marker {
  position: absolute;
  left: -37px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.tl-date {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.tl-body h3 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.tl-org {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.tl-body ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tl-body li {
  position: relative;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.96rem;
  max-width: 760px;
}

.tl-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 1px;
  background: var(--text-faint);
}

/* ============================================
   PROJECTS
============================================ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

.project-card:hover,
.project-card.is-diagram-open {
  transform: translateY(-4px);
  border-color: rgba(0, 214, 160, 0.35);
}

.project-card.has-diagram { cursor: pointer; }

.project-card--wide { grid-column: span 2; }

.project-tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--accent-2);
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-weight: 500;
}

.project-card h3 {
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.project-card > p:not(.project-diagram-hint) {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 16px;
  max-width: 680px;
}

.project-outcomes {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-outcomes li {
  position: relative;
  padding-left: 16px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
}

.project-outcomes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

.project-diagram-hint {
  margin: 18px 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  transition: color 0.3s var(--ease), opacity 0.3s var(--ease);
}

.project-card:hover .project-diagram-hint,
.project-card.is-diagram-open .project-diagram-hint {
  color: var(--accent);
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.project-diagram {
  display: grid;
  grid-template-rows: 0fr;
  margin: 0;
  opacity: 0;
  transition: grid-template-rows 0.45s var(--ease), opacity 0.35s var(--ease), margin 0.35s var(--ease);
}

.project-diagram > * {
  min-height: 0;
  overflow: hidden;
}

.project-card:hover .project-diagram,
.project-card.is-diagram-open .project-diagram,
.project-card:focus-within .project-diagram {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 22px;
}

.project-diagram img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #090c10;
}

/* Project Action Links (GitHub & Live Preview) */
.project-links {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  z-index: 2;
  position: relative;
}

.project-link-btn--github {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.project-link-btn--github:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.project-link-btn--live {
  background: rgba(0, 214, 160, 0.10);
  color: var(--accent);
  border: 1px solid rgba(0, 214, 160, 0.28);
}

.project-link-btn--live:hover {
  background: rgba(0, 214, 160, 0.20);
  color: #00ffbe;
  border-color: rgba(0, 214, 160, 0.55);
  box-shadow: 0 4px 14px rgba(0, 214, 160, 0.22);
  transform: translateY(-2px);
}

.project-link-btn .link-arrow {
  font-size: 0.85rem;
  transition: transform 0.2s var(--ease);
}

.project-link-btn:hover .link-arrow {
  transform: translate(2px, -2px);
}

/* ============================================
   CREDENTIALS & EDUCATION
============================================ */
.credentials {
  padding-top: 0;
  padding-bottom: 0;
}

.cred-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 80px 0;
}

.cred-block h2 {
  font-size: 1.5rem;
  margin-bottom: 28px;
}

/* Expandable Awards & Certifications Card */
.cred-block--certs {
  position: relative;
  transition: all 0.35s var(--ease);
}

.cred-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.cred-block-header h2 {
  margin-bottom: 0 !important;
}

.cred-expand-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(0, 214, 160, 0.08);
  border: 1px solid rgba(0, 214, 160, 0.22);
  padding: 4px 11px;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  user-select: none;
}

.cred-expand-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.cred-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cred-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 16px;
  transition: all 0.25s var(--ease);
}

.cred-list li:last-child { border-bottom: none; }

.cred-list span { font-size: 1rem; color: var(--text); }

.cred-list a.cred-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s var(--ease);
}

.cred-list a.cred-link:hover span {
  color: var(--accent);
}

.cred-list a.cred-link .cred-link-icon {
  display: inline-block;
  font-size: 0.85rem;
  margin-left: 4px;
  color: var(--accent);
  opacity: 0.85;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.cred-list a.cred-link:hover .cred-link-icon {
  transform: translate(2px, -2px);
  opacity: 1;
}

.cred-list a.cred-link:hover em {
  color: var(--text-muted);
}

.cred-list em {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.cred-list .cred-coursework {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Initially, hide certificates beyond the first 3 */
.cred-list--expandable li:nth-child(n+4) {
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

/* On hover (or when focused / tapped), expand and show all certificates */
.cred-block--certs:hover .cred-list--expandable li:nth-child(n+4),
.cred-block--certs:focus-within .cred-list--expandable li:nth-child(n+4),
.cred-block--certs.is-expanded .cred-list--expandable li:nth-child(n+4) {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  animation: certSlideDown 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes certSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cred-block--certs:hover .cred-expand-badge,
.cred-block--certs:focus-within .cred-expand-badge,
.cred-block--certs.is-expanded .cred-expand-badge {
  background: rgba(0, 214, 160, 0.16);
  border-color: rgba(0, 214, 160, 0.42);
  color: #00ffbe;
  box-shadow: 0 2px 10px rgba(0, 214, 160, 0.15);
}

/* ============================================
   MODERN BENTO AVAILABILITY & CONTACT HUB
============================================ */
.contact {
  text-align: left;
  position: relative;
}

.contact-header {
  margin-bottom: 34px;
}

.contact-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(0, 214, 160, 0.08);
  border: 1px solid rgba(0, 214, 160, 0.26);
  color: #00d6a0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  box-shadow: 0 0 24px rgba(0, 214, 160, 0.12);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00d6a0;
  display: inline-block;
  animation: pulseBeacon 2s infinite;
}

@keyframes pulseBeacon {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 214, 160, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 214, 160, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 214, 160, 0); }
}

.status-sep {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 300;
}

.status-sub {
  color: var(--text-muted);
  font-weight: 500;
}

.contact-title {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  color: var(--text);
}

.highlight-text {
  color: var(--text);
  display: inline-block;
}

.contact-lead {
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 680px;
}

/* Bento Grid Container */
.contact-bento {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 22px;
  align-items: stretch;
}

/* Left Bento: Career & Dispatch Deck */
.bento-card--main {
  background: linear-gradient(145deg, rgba(16, 21, 29, 0.94) 0%, rgba(20, 27, 38, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 32px 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.bento-card--main:hover {
  border-color: rgba(0, 214, 160, 0.25);
  box-shadow: 0 20px 48px -10px rgba(0, 214, 160, 0.08);
}

.bento-glow-mesh {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 214, 160, 0.14) 0%, rgba(34, 211, 238, 0.04) 50%, transparent 70%);
  pointer-events: none;
  filter: blur(35px);
}

.bento-main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 16px;
  position: relative;
  z-index: 1;
}

.bento-badge-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bento-tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.bento-tech-pill--accent {
  background: rgba(0, 214, 160, 0.08);
  border-color: rgba(0, 214, 160, 0.24);
  color: var(--accent);
}

.bento-terminal-id {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.bento-roles-box {
  background: rgba(9, 12, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
  z-index: 1;
}

.bento-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 8px;
  font-weight: 600;
}

.bento-roles-content {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.45;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.bento-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  position: relative;
  z-index: 1;
}

.bento-spec-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.bento-spec-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.bento-spec-icon {
  color: var(--accent);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 214, 160, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-spec-data {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bento-spec-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 600;
}

.bento-spec-val {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.35;
  font-weight: 500;
  word-break: break-word;
}

.bento-action-deck {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  padding-top: 4px;
}

.bento-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.bento-btn--primary {
  background: var(--accent);
  color: #090c10;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0, 214, 160, 0.25);
}

.bento-btn--primary:hover {
  background: #14ebb5;
  border-color: #14ebb5;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 214, 160, 0.35);
}

.bento-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.bento-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

/* Right Bento: Direct Connect Grid */
.bento-connect-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.connect-tile {
  background: linear-gradient(145deg, rgba(16, 21, 29, 0.88) 0%, rgba(22, 29, 39, 0.65) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.connect-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.connect-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
}

.connect-arrow {
  font-size: 1.15rem;
  color: var(--text-faint);
  transition: transform 0.25s ease, color 0.25s ease;
}

.connect-tile:hover .connect-arrow {
  transform: translate(2px, -2px);
  color: var(--text);
}

.connect-tile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.connect-badge-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  display: block;
}

.connect-val {
  font-size: 0.95rem;
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 600;
  word-break: break-all;
  line-height: 1.3;
}

/* Individual Connect Card Brands & Highlights */
.connect-tile--email .connect-icon-wrapper {
  background: rgba(0, 214, 160, 0.1);
  color: #00d6a0;
}
.connect-tile--email:hover {
  border-color: rgba(0, 214, 160, 0.4);
  box-shadow: 0 12px 30px -4px rgba(0, 214, 160, 0.18);
  transform: translateY(-4px);
}
.connect-tile--email:hover .connect-icon-wrapper {
  transform: scale(1.06);
  background: rgba(0, 214, 160, 0.2);
}

.connect-tile--phone .connect-icon-wrapper {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}
.connect-tile--phone:hover {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 12px 30px -4px rgba(34, 197, 94, 0.18);
  transform: translateY(-4px);
}
.connect-tile--phone:hover .connect-icon-wrapper {
  transform: scale(1.06);
  background: rgba(34, 197, 94, 0.2);
}

.connect-tile--linkedin .connect-icon-wrapper {
  background: rgba(10, 102, 194, 0.12);
  color: #38bdf8;
}
.connect-tile--linkedin:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 12px 30px -4px rgba(56, 189, 248, 0.2);
  transform: translateY(-4px);
}
.connect-tile--linkedin:hover .connect-icon-wrapper {
  transform: scale(1.06);
  background: rgba(10, 102, 194, 0.25);
}

.connect-tile--github .connect-icon-wrapper {
  background: rgba(168, 85, 247, 0.1);
  color: #c084fc;
}
.connect-tile--github:hover {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 12px 30px -4px rgba(168, 85, 247, 0.18);
  transform: translateY(-4px);
}
.connect-tile--github:hover .connect-icon-wrapper {
  transform: scale(1.06);
  background: rgba(168, 85, 247, 0.2);
}

/* ============================================
   BUTTONS
============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: #04140f;
  border: none;
}

.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  background: #1fe8b3;
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover, .btn-ghost:focus-visible {
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

/* ============================================
   FOOTER
============================================ */
.footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 32px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

.footer-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: all 0.25s var(--ease);
}

.footer-admin-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   MODERN COMPREHENSIVE RESPONSIVE DESIGN SYSTEM
============================================ */

/* Tablets & Small Laptops (<= 992px) */
@media (max-width: 992px) {
  :root {
    --gap: 32px;
  }
  .section {
    padding: 96px 0;
  }
  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .about-photo {
    max-width: 280px;
    margin: 0 auto;
  }
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .cred-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 0;
  }
  .contact-bento {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Tablet Portrait & Large Phones (<= 768px) */
@media (max-width: 768px) {
  :root {
    --gap: 24px;
  }
  .section {
    padding: 80px 0;
  }
  .section-head {
    margin-bottom: 40px;
  }
  .project-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .project-card--wide {
    grid-column: span 1;
  }
  .hero-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .writing-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .writing-card-media {
    min-height: 220px;
    max-height: 260px;
  }
  .bento-specs-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-float-card--arch,
  .hero-float-card--stack {
    transform: scale(0.85) rotate(var(--r, 0deg));
  }
}

/* Mobile Phones (<= 576px) */
@media (max-width: 576px) {
  .container {
    padding: 0 18px;
  }
  .section {
    padding: 64px 0;
  }
  .section-head {
    margin-bottom: 32px;
  }
  .section-eyebrow {
    font-size: 0.74rem;
    padding: 4px 10px;
  }
  .section-title {
    font-size: clamp(1.85rem, 6.5vw, 2.35rem);
    letter-spacing: -0.02em;
  }

  /* Hero Mobile */
  .hero {
    padding: 88px 16px 28px;
    min-height: auto;
  }
  .hero-copy {
    padding: 0;
    margin-top: 10px;
  }
  .hero-title {
    font-size: clamp(2.35rem, 9.5vw, 3.4rem);
    line-height: 1.08;
  }
  .hero-tagline {
    font-size: clamp(1.25rem, 4.8vw, 1.65rem);
    margin-top: 10px;
  }
  .hero-sub {
    font-size: 0.98rem;
    margin-top: 12px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-top: 20px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 13px 18px;
  }
  .hero-visual {
    min-height: 220px;
    padding: 14px 6px;
    margin-top: 8px;
  }
  .hero-float-card--terraform,
  .hero-float-card--k8s,
  .hero-float-card--arch,
  .hero-float-card--stack {
    display: none;
  }
  .hero-wordmark--main {
    font-size: clamp(28px, 12vw, 80px);
  }
  .hero-links {
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 18px;
  }
  .hero-link-card {
    padding: 14px 16px;
    border-radius: 12px;
  }

  /* About Mobile */
  .about-photo {
    max-width: 200px;
    border-radius: 16px;
  }
  .about-copy h2 {
    font-size: 1.55rem;
    margin-bottom: 16px;
  }
  .about-copy p {
    font-size: 0.94rem;
    line-height: 1.55;
  }
  .stat-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 24px;
    margin-top: 24px;
  }
  .stat {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 14px 10px;
    text-align: center;
  }
  .stat-num, .stat-unit {
    font-size: 1.85rem;
  }
  .stat p {
    font-size: 0.78rem;
    margin-top: 4px;
  }

  /* Skills Mobile */
  .skill-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .skill-card {
    padding: 22px 18px;
    border-radius: 16px;
  }
  .skill-card h3 {
    font-size: 1.15rem;
  }

  /* Experience Mobile */
  .timeline {
    padding-left: 20px;
    margin-left: 4px;
  }
  .tl-marker {
    left: -26px;
    width: 11px;
    height: 11px;
    top: 5px;
  }
  .tl-item {
    padding-bottom: 44px;
  }
  .tl-body h3 {
    font-size: 1.18rem;
  }
  .tl-org {
    font-size: 0.88rem;
    margin-bottom: 12px;
  }
  .tl-body li {
    font-size: 0.88rem;
    line-height: 1.5;
    padding-left: 16px;
  }

  /* Projects Mobile */
  .project-card {
    padding: 22px 18px;
    border-radius: 16px;
  }
  .project-card h3 {
    font-size: 1.25rem;
  }
  .project-card > p:not(.project-diagram-hint) {
    font-size: 0.92rem;
  }
  .project-outcomes li {
    font-size: 0.86rem;
  }
  .project-links {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .project-link-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
  }

  /* Credentials Mobile */
  .cred-block h2 {
    font-size: 1.35rem;
    margin-bottom: 20px;
  }
  .cred-expand-badge {
    font-size: 0.72rem;
    padding: 4px 9px;
  }
  .cred-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .cred-list em {
    font-size: 0.78rem;
  }

  /* Series / Writing Slider Mobile */
  .writing {
    padding: 56px 0 64px;
  }
  .writing-title {
    font-size: 0.88rem;
    margin-bottom: 24px;
  }
  .writing-slider {
    padding: 0 16px;
  }
  .writing-card {
    width: calc(100vw - 36px);
    border-radius: 16px;
  }
  .writing-card-media {
    min-height: 180px;
    max-height: 210px;
  }
  .writing-card-body {
    padding: 20px 16px;
  }
  .writing-card-body h3 {
    font-size: 1.15rem;
  }
  .writing-card-body p {
    font-size: 0.88rem;
  }
  .writing-nav {
    display: none;
  }

  /* Bento Contact Mobile */
  .contact-title {
    font-size: 1.75rem;
  }
  .contact-lead {
    font-size: 0.95rem;
  }
  .bento-card--main {
    padding: 22px 16px;
    border-radius: 18px;
    gap: 18px;
  }
  .bento-roles-box {
    padding: 14px 16px;
  }
  .bento-roles-content {
    font-size: 0.95rem;
  }
  .bento-spec-item {
    padding: 12px;
  }
  .bento-action-deck {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .bento-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }
  .bento-connect-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .connect-tile {
    min-height: 110px;
    padding: 18px 16px;
    border-radius: 16px;
  }
  .connect-tile-top {
    margin-bottom: 12px;
  }
  .connect-icon-wrapper {
    width: 38px;
    height: 38px;
  }

  /* Footer Mobile */
  .footer {
    flex-direction: column;
    gap: 14px;
    text-align: center;
    padding: 32px 0 44px;
  }
  .footer-links {
    justify-content: center;
  }
}

/* Small Phones & Foldables (<= 380px) */
@media (max-width: 380px) {
  .container {
    padding: 0 14px;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .stat-row {
    grid-template-columns: 1fr;
  }
  .stat-num, .stat-unit {
    font-size: 1.65rem;
  }
  .writing-card {
    width: calc(100vw - 28px);
  }
}
