:root {
  --bg: #0d0d0d;
  --card-bg: #0d0d0d;
  --text: #f5f5f0;
  --text-muted: #a8a8a8;
  --primary: #d4d4d4;
  --secondary: #b0b0b0;
  --border: #2a2a2a;
  --font-main: DM Sans, "Segoe UI", system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-family: var(--font-main);
}
body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1000px 600px at 10% -10%, rgba(212, 212, 212, 0.08), transparent 60%),
    radial-gradient(900px 700px at 100% 0%, rgba(176, 176, 176, 0.06), transparent 60%),
    radial-gradient(800px 600px at 80% 90%, rgba(212, 212, 212, 0.06), transparent 60%);
  pointer-events: none;
  z-index: -2;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(168, 168, 168, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 168, 168, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.15;
  pointer-events: none;
  z-index: -3;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}
a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}
ul {
  list-style: none;
}

hr{
  margin: 0rem auto;
  border: 0;
  height: 1px;
  background: var(--border);
  max-width: calc(100% - 3rem);
}

/* Typography */
h1 {
  font-size: clamp(2rem, 4.5vw, 2.5rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
h2 {
  font-size: clamp(1.5rem, 3.4vw, 1.6rem);
  margin-bottom: 2rem;
  font-weight: 700;
}
h3 {
  font-size: clamp(1.1rem, 2.3vw, 1.2rem);
  margin-bottom: 0.5rem;
}
p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: clamp(0.9rem, 2vw, 1rem);
}
.gradient-text {
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.logo-mark {
  width: 1.8rem;
  height: 1.8rem;
  flex-shrink: 0;
}
.logo span {
  line-height: 1;
}
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-links a:hover {
  color: var(--primary);
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: rgba(15, 23, 42, 0.9);
  padding: 0.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 10px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

/* Hero */
header {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding-top: 70px;
}
.hero-content {
  max-width: 1100px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(212, 212, 212, 0.1);
  color: var(--primary);
  border-radius: 2rem;
  margin-bottom: 2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border: 1px solid rgba(212, 212, 212, 0.2);
}
.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.btn {
  padding: 0.8rem 2rem;
  border-radius: 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  border-width: 0px;
}
.btn.primary {
  background: var(--primary);
  color: #0d0d0d;
  /* box-shadow: 0 0 25px rgba(212, 212, 212, 0.25); */
}
.btn.secondary {
  border: 1px solid rgba(168, 168, 168, 0.3);
}
.btn:hover {
  transform: translateY(-3px);
  cursor: pointer;
}
.btn:active {
  transform: translateY(-3px);
}

/* Sections */
section {
  padding: 6rem 0;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

/* Cards */
.card {
  /* background: linear-gradient(165deg, rgba(26, 26, 26, 0.95), rgba(13, 13, 13, 0.9)); */
  padding: 2rem;
  /* border-radius: 1rem; */
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(13, 13, 13, 0.5);
}
.card:hover {
  border-color: var(--primary);
  box-shadow: 0 28px 50px rgba(80, 80, 80, 0.6);
}
.icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
}
.icon.cyan {
  color: #c0c0c0;
}
.icon.purple {
  color: #b0b0b0;
}
.icon.red {
  color: #f87171;
}
.icon.emerald {
  color: #34d399;
}

.tags {
  margin-top: auto;
}
.tags span {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.8rem;
  background: rgba(42, 42, 42, 0.8);
  border-radius: 1rem;
  margin: 0 0.5rem 0.5rem 0;
  color: #b8b8b8;
}

/* Work Card Specifics */
.work-card {
  text-decoration: none;
  position: relative;
}
.project-media {
  position: relative;
  margin-bottom: 1.25rem;
  /* border-radius: 0.9rem; */
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.85);
  aspect-ratio: 16 / 9;
  cursor: pointer;
}
.project-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}
.project-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
  transition: transform 0.35s ease, filter 0.35s ease;
}
.media-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 245, 240);
  text-shadow: 0 0 20px rgba(0, 0, 0);
  background: radial-gradient(circle at 30% 20%, rgba(212, 212, 212, 0.08), transparent 5%);
  transition: transform 0.35s ease;
  z-index: 2;
}
.project-media:hover .project-thumb {
  transform: scale(1.03);
  filter: saturate(1.2) contrast(1.1);
}
.project-media:hover::after {
  opacity: 0;
}
.project-media:hover .media-fallback {
  transform: translateY(-2px);
}
.work-links {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.work-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(212, 212, 212, 0.08);
}
.work-link-btn:hover {
  background: var(--primary);
  color: #0d0d0d;
}
.work-link-btn.secondary-link {
  border-color: var(--border);
  color: #b8b8b8;
}
.work-link-btn.secondary-link:hover {
  border-color: var(--secondary);
  background: var(--secondary);
  color: #0d0d0d;
}
.work-link-btn.disabled-link {
  border-color: var(--border);
  color: var(--text-muted);
  background: transparent;
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.7;
}
.project-description-toggle {
  background: transparent;
  border: 0;
  color: var(--primary);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}
.project-description-toggle:hover {
  text-decoration: underline;
}
.project-description-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.external-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

/* Experience */
.experience-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  flex-direction: column;
  gap: 1rem;
}
.experience-card {
  width: 100%;
  /* border-radius: 0.9rem; */
}
.experience-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.25rem;
}
.experience-top-row h3 {
  margin-bottom: 0;
}
.experience-meta {
  color: #b8b8b8;
  font-size: 0.9rem;
  white-space: nowrap;
}
.experience-role {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.live{
  color: var(--primary);
  margin-bottom: 0.5rem;
  transition: all 0.5s ease;

}
.live:hover {
  opacity: 0.5;
}

/* Brands */
#brands {
  overflow: hidden;
}
.section-eyebrow {
  margin-bottom: 0.65rem;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand-slider {
  position: relative;
  margin-top: 2.25rem;
  overflow: hidden;
  outline: none;
}
.brand-slider::before,
.brand-slider::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(10vw, 9rem);
  z-index: 1;
  pointer-events: none;
}
.brand-slider::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.brand-slider::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}
.brand-slider:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 0.4rem;
}
.brand-slider__track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.brand-slider__group {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 1rem;
  padding-right: 1rem;
}
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(10rem, 18vw, 14rem);
  /* height: 7.5rem; */
  padding: 1.25rem;
  background: rgba(26, 26, 26, 0.56);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.brand-logo:hover {
  border-color: var(--primary);
  box-shadow: 0 28px 50px rgba(80, 80, 80, 0.6);
}
.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Leadership */
.split-layout {
  display: flex;
  gap: 4rem;
  align-items: center;
  flex-wrap: wrap;
}
.editing-layout {
  margin-top: 3rem;
}
.text-content {
  flex: 1;
  min-width: 300px;
}
.image-content {
  flex: 1;
  min-width: 300px;
  overflow: hidden;
  /* border-radius: 1rem; */
}
.image-content img {
  width: 100%;
  /* border-radius: 1rem; */
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}
.image-content:hover img {
  transform: scale(1.05);
}
.team-links {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.team-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 500;
  transition: color 0.3s;
}
.team-links a:hover {
  color: var(--secondary);
}
.stats-row {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}
.stat-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border);
  flex: 1;
}

/* Tools physics playground */
#tools {
  padding: 0;
}
.tools-physics {
  position: relative;
  height: calc(100vh - 118px);
  height: calc(100dvh - 118px);
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 1px 1px, rgba(212, 212, 212, 0.12) 1px, transparent 0) 0 0 / 26px 26px,
    rgba(26, 26, 26, 0.55);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.tools-physics__title {
  position: absolute;
  top: 7rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  margin: 0;
  padding: 0.6rem 0.85rem;
  text-align: center;
  /* border: 1px solid rgba(212, 212, 212, 0.28); */
  /* background: rgba(13, 13, 13, 0.94); */
  color: var(--text);
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  font-weight: 700;
  line-height: 1.1;
  pointer-events: none;
}
.tools-physics__canvas,
.tools-physics__canvas canvas {
  width: 100%;
  height: 100%;
}
.tools-physics__canvas canvas {
  display: block;
  cursor: grab;
  touch-action: none;
}
.tools-physics__canvas.is-grabbing canvas {
  cursor: grabbing;
}

/* @media (max-width: 560px) {
  .tools-physics__title {
    top: 1rem;
    left: 1rem;
  }
} */


/* Contact */
.center-text {
  text-align: center;
}
.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 4rem;
}
.social-links a {
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.social-links a:hover {
  background: var(--primary);
  color: #000;
}
.social-links a svg {
  width: 24px;
  height: 24px;
  display: block;
}
footer {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal-open {
  overflow: hidden;
}

.video-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 13, 0.90);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 200;
}
.video-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.video-modal__overlay {
  position: absolute;
  inset: 0;
}
.video-modal__inner {
  position: relative;
  width: min(95vw, 1100px);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 1rem;
  border: 1px solid rgba(168, 168, 168, 0.2);
  box-shadow: 0 35px 80px rgba(13, 13, 13, 0.9);
  overflow: hidden;
}
.video-modal__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.video-modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(168, 168, 168, 0.3);
  background: rgba(13, 13, 13, 0.8);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}
.video-modal__close:hover {
  background: rgba(212, 212, 212, 0.15);
  transform: scale(1.05);
}


.resume-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 13, 13, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 210;
}
.resume-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.resume-modal__overlay {
  position: absolute;
  inset: 0;
}
.resume-modal__inner {
  position: relative;
  width: min(92vw, 520px);
  padding: 2rem;
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.98), rgba(18, 18, 18, 0.98));
  border: 1px solid rgba(168, 168, 168, 0.2);
  box-shadow: 0 35px 80px rgba(13, 13, 13, 0.9);
  z-index: 1;
}
.resume-modal__inner h3 {
  margin-bottom: 0.65rem;
  padding-right: 3rem;
}
.resume-modal__inner p {
  margin-bottom: 1.5rem;
}
.resume-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}
.resume-modal__action {
  min-width: 10.5rem;
}
.resume-modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(168, 168, 168, 0.3);
  background: rgba(13, 13, 13, 0.8);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 2;
}
.resume-modal__close:hover {
  background: rgba(212, 212, 212, 0.15);
}

/* Mobile */
@media (max-width: 768px) {
  section {
    padding: 4.5rem 0;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    position: absolute;
    top: 70px;
    right: 1.5rem;
    left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: rgba(26, 26, 26, 0.98);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    box-shadow: 0 25px 40px rgba(13, 13, 13, 0.7);
  }
  .nav-links a {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child {
    border-bottom: 0;
  }
  .nav-open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .experience-top-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .experience-meta {
    white-space: normal;
  }
  .split-layout {
    flex-direction: column;
    gap: 2rem;
  }
  .cta-group {
    width: 100%;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .project-media {
    margin-bottom: 1rem;
  }
  .social-links {
    gap: 1rem;
    flex-wrap: wrap;
  }
  .experience-list {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  flex-direction: column;
  gap: 1rem;
}
  .brand-logo {
    width: 9.5rem;
    height: 6.75rem;
    padding: 1rem;
  }
}

@media (hover: none) {
  .project-media {
    cursor: default;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-slider__track { transform: none !important; }
}

@media (max-width: 560px) {
  .container {
    padding: 0 1.1rem;
  }
  header {
    min-height: 100vh;
    padding-top: 70px;
  }
  h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.75rem;
  }
  p {
    font-size: clamp(0.9rem, 1.7vw, 0.9rem);
    line-height: 1.5;
    margin-bottom: 0.8rem;
  }
  .badge {
    margin-bottom: 0.85rem;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
  }
  .cta-group {
    margin-top: 0.9rem;
    gap: 0.65rem;
  }
  .btn {
    padding: 0.65rem 1.35rem;
    font-size: 0.88rem;
  }
  .card {
    padding: 1.5rem;
  }
  .work-links {
    gap: 0.5rem;
  }
  .team-links {
    flex-direction: column;
    align-items: flex-start;
  }
  .experience-meta {
    font-size: 0.85rem;
  }
}

@media (max-width: 460px) {
  header {
    min-height: 100vh;
    padding-top: 82px;
    padding-bottom: 2rem;
  }
  .hero-content {
    max-width: 100%;
  }
  h1 {
    font-size: clamp(1.55rem, 5vw, 2.1rem);
    margin-bottom: 0.6rem;
  }
  h2 {
    font-size: clamp(1.55rem, 4vw, 2rem);
    margin-bottom: 1.4rem;
  }
  p {
    font-size: 0.88rem;
    line-height: 1.45;
    margin-bottom: 0.7rem;
  }
  .badge {
    margin-bottom: 0.75rem;
  }
  .cta-group {
    margin-top: 0.8rem;
  }
  .btn {
    padding: 0.6rem 1.1rem;
    font-size: 0.85rem;
  }
  .card {
    padding: 1.25rem;
  }
  .resume-modal__inner {
    padding: 1.5rem;
  }
  .resume-modal__action {
    min-width: 100%;
  }
}
