:root {
  --bg: #ffffff;
  --bg-dark: #000000;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-on-dark: #f5f5f7;
  --text-on-dark-secondary: #a1a1a6;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: #d2d2d7;
  --card-bg: #f5f5f7;
  --nav-height: 52px;
  --max-width: 1200px;
}

@media (min-width: 1440px) {
  :root { --max-width: 1320px; }
}

@media (min-width: 1800px) {
  :root { --max-width: 1480px; }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

ul {
  list-style: none;
}

img, svg {
  display: block;
}

#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 24px rgba(0,0,0,0.04);
}

.nav-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
  transition: transform 0.2s ease, background 0.4s ease, color 0.4s ease;
}

#navbar.scrolled .nav-logo {
  background: var(--text);
  color: #fff;
}

.nav-logo:hover {
  transform: scale(1.06);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  position: relative;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-on-dark);
  opacity: 0.85;
  padding: 4px 0;
  transition: color 0.4s ease, opacity 0.2s ease;
}

#navbar.scrolled .nav-links a {
  color: var(--text);
  opacity: 0.75;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1.5px;
  background: var(--text-on-dark);
  transition: right 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s ease;
}

#navbar.scrolled .nav-links a::after {
  background: var(--text);
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a:hover::after {
  right: 0;
}

.nav-cta {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 18px;
  border-radius: 980px;
  transition: background 0.3s ease, color 0.4s ease, border-color 0.4s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

#navbar.scrolled .nav-cta {
  background: var(--text);
  color: #fff;
  border-color: transparent;
}

#navbar.scrolled .nav-cta:hover {
  background: #000;
}

#menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

#menu-toggle span {
  width: 100%;
  height: 1.5px;
  background: var(--text-on-dark);
  transition: transform 0.25s ease, opacity 0.2s ease, background 0.4s ease;
}

#navbar.scrolled #menu-toggle span {
  background: var(--text);
}

#menu-toggle.active span:nth-child(1) {
   transform: translateY(6.5px) rotate(45deg);
}

#menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

#menu-toggle.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

#mobile-menu {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  padding: 0 24px;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), padding 0.35s ease, background 0.4s ease;
}

#mobile-menu a {
  padding: 14px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  transition: color 0.4s ease, border-color 0.4s ease;
}

#mobile-menu a:last-child {
  border-bottom: none;
}

#mobile-menu.open {
  max-height: 260px;
  padding: 8px 24px 16px;
}

#navbar.scrolled #mobile-menu {
  background: rgba(255, 255, 255, 0.86);
}

#navbar.scrolled #mobile-menu a {
  color: var(--text);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  overflow: hidden;
  padding: 0 24px;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0,113,227,0.25) 0%, rgba(0,113,227,0.08) 35%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(48px, 9vw, 88px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--text-on-dark-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-cue span {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--text-on-dark-secondary));
  animation: scrollPulse 2s ease-in-out infinite;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: var(--text-on-dark);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.16);
}

.btn-large {
  font-size: 19px;
  padding: 16px 36px;
  margin: 32px 0 24px;
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 120px 24px;
}

.section-head {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-head h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-head p {
  font-size: 19px;
  color: var(--text-secondary);
}

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

.project-card {
  background: var(--card-bg);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.project-visual {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.project-visual svg {
  width: 56px;
  height: 56px;
}

.project-logo-badge {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.project-logo-badge[hidden] {
  display: none;
}

.project-logo-badge img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.visual-1 {
  background: linear-gradient(135deg, #4f7cff, #2541b2);
}

.visual-2 {
  background: linear-gradient(135deg, #ff6b6b, #c92a2a);
}

.visual-3 {
  background: linear-gradient(135deg, #34c759, #0d7a3a);
}

.visual-4 {
  background: linear-gradient(135deg, #af52de, #6e1f9e);
}

.project-body {
  padding: 28px 28px 32px;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.project-tags span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.05);
  padding: 4px 10px;
  border-radius: 6px;
}

.project-body h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.project-body p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.project-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.project-link span {
  transition: transform 0.2s ease;
}

.project-link:hover span {
  transform: translateX(3px);
}

.project-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.project-meta .stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.project-meta .stat svg {
  width: 14px;
  height: 14px;
}

.projects-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 32px;
}

.about-section {
  background: var(--card-bg);
  border-radius: 32px;
  max-width: calc(var(--max-width) + 48px);
  padding: 100px 72px;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.about-text h2 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.about-text p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 640px;
}

.about-divider {
  height: 1px;
  background: var(--border);
}

.about-skills h3 {
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 32px;
}

.skills-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.skills-column {
  border-left: 1px solid var(--border);
  padding-left: 24px;
}

.skills-column:first-child {
  border-left: none;
  padding-left: 0;
}

.skills-column h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

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

.skills-column li {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
}

.contact-section {
  text-align: center;
  padding-bottom: 160px;
}

.contact-inner h2 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.contact-inner p {
  font-size: 19px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  padding: 10px 18px;
  border-radius: 980px;
  border: 1px solid var(--border);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

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

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.social-link.muted {
  color: var(--text-secondary);
  cursor: default;
}

.social-link.muted:hover {
  color: var(--text-secondary);
  border-color: var(--border);
  transform: none;
}

.site-footer {
  text-align: center;
  padding: 32px 24px 48px;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

@media (max-width: 900px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .about-content {
    gap: 48px;
  }
  .skills-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 24px;
  }
  .skills-column:nth-child(2) {
    border-left: 1px solid var(--border);
    padding-left: 24px;
  }
  .skills-column:nth-child(n+3) {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 24px;
  }
  .about-section {
    border-radius: 24px;
    padding: 72px 32px;
    margin: 0 16px;
    max-width: none;
  }
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
  }
  #menu-toggle {
    display: flex;
  }
  .section {
    padding: 80px 20px;
  }
  .skills-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .skills-column, .skills-column:nth-child(2) {
    border-left: none;
    padding-left: 0;
  }
  .skills-column:not(:first-child) {
    border-top: 1px solid var(--border);
    padding-top: 24px;
  }
}

@media (min-width: 1200px) {
  .section {
    padding: 140px 32px;
  }
  .projects-grid {
    gap: 32px;
  }
  .about-content {
    gap: 80px;
  }
  .about-section {
    padding: 130px 100px;
  }
  .hero-content {
    max-width: 800px;
  }
  .hero-sub {
    max-width: 620px;
  }
}

@media (min-width: 1800px) {
  .nav-inner { padding: 0 40px; }
}
