/* ── RESET & VARIABLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --border: #222222;
  --text: #ffffff;
  --text-muted: #888888;
  --text-secondary: #cccccc;
  --accent: #a3e635;
  --accent-bg: rgba(163, 230, 53, 0.12);
  --accent-border: rgba(163, 230, 53, 0.3);
  --radius: 12px;
  --radius-lg: 16px;
  --max-width: 1080px;
  --border-hover: #333333;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ── SKIP LINK ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  z-index: 200;
}

.skip-link:focus {
  top: 16px;
}

/* ── FOCUS STYLES ── */
a:focus-visible,
.btn:focus-visible,
.more-item:focus-visible,
.contact-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── SECTION COMMON ── */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 40px;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.section-divider {
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  border: none;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  opacity: 0.7;
}

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

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

/* ── TAGS ── */
.tag {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.03em;
}

/* ── CARD ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--border-hover);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 40px;
  transition: background 0.3s, backdrop-filter 0.3s;
}

nav.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
  padding: 12px 4px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--accent-border);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}

.hero-comment {
  color: #777;
  font-size: 14px;
  font-family: 'Courier New', monospace;
  margin-bottom: 4px;
}

.hero-const {
  color: var(--accent);
  font-size: 14px;
  font-family: 'Courier New', monospace;
  margin-bottom: 12px;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero-tagline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.hero-dash {
  width: 32px;
  height: 2px;
  background: var(--accent);
}

.hero-tagline-text {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

/* Code block */
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
}

.code-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

/* Hero CTAs */
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero Right */
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-photo-frame {
  position: relative;
  margin-bottom: 28px;
}

.hero-photo {
  width: 260px;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.hero-photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 30px 15px var(--bg);
  pointer-events: none;
}

.hero-photo-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--accent-border);
}

.hero-stats {
  display: flex;
  gap: 32px;
  text-align: center;
}

.hero-stat-num {
  display: block;
  font-size: 24px;
  font-weight: 700;
}

.hero-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.about-bio p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.skill-tag {
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
}

.about-section-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.edu-card {
  padding: 20px;
  margin-bottom: 12px;
}

.edu-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.edu-school {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.edu-year {
  font-size: 12px;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}

.about-section-label--spaced {
  margin-top: 24px;
}

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

.lang-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 8px;
}

/* Tech Stack */
.tech-stack {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.tech-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 8px;
}

/* ── CASE STUDIES ── */
.case-study {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  min-height: 280px;
  transition: border-color 0.2s;
}

.case-study:hover {
  border-color: var(--border-hover);
}

/* Swap image/content columns */
.case-study-reverse .case-study-image {
  order: 2;
}

.case-study-reverse .case-study-content {
  order: 1;
}

.case-study-image {
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  overflow: hidden;
}

.case-study-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-card);
}

.case-study-content {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.case-study-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.case-study-content h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.case-study-content p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.case-study-impact {
  margin-bottom: 20px;
  font-size: 13px;
}

.impact-label {
  color: var(--accent);
  font-weight: 600;
  margin-right: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.case-study-impact span:last-child {
  color: var(--text-secondary);
}

.case-study-links {
  display: flex;
  gap: 10px;
}

.btn-sm {
  font-size: 12px;
  padding: 10px 18px;
}

/* ── MORE PROJECTS ── */
.more-projects {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  margin-top: 16px;
}

.more-projects-header {
  text-align: center;
  margin-bottom: 24px;
}

.more-projects-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.more-projects-header p {
  color: var(--text-muted);
  font-size: 13px;
}

.more-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.more-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  min-height: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}

.more-item:hover {
  border-color: var(--border-hover);
}

.more-item:hover .more-link {
  color: var(--accent);
}

.more-item-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.more-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.more-desc {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.more-link {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.more-link.live {
  color: var(--accent);
}

.more-projects-cta {
  text-align: center;
  margin-top: 24px;
}

/* ── CONTACT ── */
.contact-cards {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 32px;
  transition: border-color 0.2s, transform 0.2s;
}

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

.contact-icon {
  font-size: 22px;
}

.contact-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.contact-value {
  font-size: 15px;
  font-weight: 500;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* ── RESPONSIVE: TABLET (768px) ── */
@media (max-width: 768px) {
  .hero {
    padding: 100px 24px 60px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-right {
    order: -1;
  }

  .hero-tagline {
    justify-content: center;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .section {
    padding: 60px 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .case-study {
    grid-template-columns: 1fr;
  }

  .case-study-reverse .case-study-image {
    order: 0;
  }

  .case-study-image {
    min-height: 200px;
  }

  .more-grid {
    grid-template-columns: 1fr;
  }

  .contact-cards {
    flex-direction: column;
    align-items: center;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ── RESPONSIVE: PHONE (375px) ── */
@media (max-width: 480px) {
  nav {
    padding: 12px 16px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero {
    padding: 80px 16px 40px;
  }

  .hero-name {
    font-size: 2rem;
  }

  .hero-const {
    font-size: 12px;
  }

  .code-block {
    font-size: 11px;
    padding: 14px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .hero-photo {
    width: 200px;
    height: 260px;
  }

  .section {
    padding: 48px 16px;
  }

  .tech-stack {
    gap: 10px;
  }

  .tech-item {
    font-size: 11px;
    padding: 6px 12px;
  }

  .case-study-content {
    padding: 24px;
  }

  .more-desc {
    display: none;
  }

  .contact-card {
    padding: 14px 20px;
    width: 100%;
  }

  footer {
    padding: 20px 16px;
  }
}

/* ── CODE SYNTAX HIGHLIGHTING ── */
.syn-keyword { color: #c678dd; }
.syn-variable { color: #e5c07b; }
.syn-key { color: #e06c75; }
.syn-string { color: #98c379; }
.syn-bracket { color: #e5c07b; }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── PRINT ── */
@media print {
  nav, .hero-ctas, .code-block, .skip-link { display: none; }
  .hero { min-height: auto; padding: 20px 0; }
  .section { padding: 20px 0; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 11px; color: #666; }
  a.more-item::after { display: none; }
  body { background: #fff; color: #000; }
  .card, .case-study, .more-item { border-color: #ccc; }
}
