@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap");

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f4f0;
  --bg-card: #ffffff;
  --bg-card-hover: #fafaf8;
  --bg-accent: #111111;
  --bg-tag: #f0ede8;

  --text-primary: #0a0a0a;
  --text-secondary: #5a5a5a;
  --text-muted: #999999;
  --text-on-accent: #ffffff;

  --border: #e5e2dd;
  --border-strong: #c8c4be;

  --accent: #111111;
  --accent-2: #e8531a;
  --accent-2-light: #fdf0eb;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --font-display: sans-serif;
  --font-body: sans-serif;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height: 68px;
}

[data-theme="dark"] {
  --bg-primary: #0e0e0e;
  --bg-secondary: #161616;
  --bg-card: #1a1a1a;
  --bg-card-hover: #1f1f1f;
  --bg-accent: #f5f5f5;
  --bg-tag: #252525;

  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-muted: #606060;
  --text-on-accent: #0a0a0a;

  --border: #2a2a2a;
  --border-strong: #3a3a3a;

  --accent: #f0f0f0;
  --accent-2: #ff6b35;
  --accent-2-light: #1f1208;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition:
    background-color var(--transition-slow),
    color var(--transition-slow);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

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

#loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-primary);
}
.loader-dots {
  display: flex;
  gap: 8px;
}
.loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: loaderBounce 1.2s ease-in-out infinite;
}
.loader-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.loader-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes loaderBounce {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 80px);
  gap: 24px;
  transition:
    background var(--transition-slow),
    border-color var(--transition-slow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  margin-right: auto;
  color: var(--text-primary);
}
.nav-logo span {
  color: var(--accent-2);
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition);
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-tag);
}
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-tag);
  font-weight: 600;
}
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-tag);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--text-primary);
}
.theme-toggle:hover {
  background: var(--bg-secondary);
  border-color: var(--border-strong);
  transform: rotate(20deg);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  padding: 16px clamp(20px, 5vw, 80px);
  flex-direction: column;
  gap: 4px;
  animation: slideDown 0.2s ease;
  transition: background var(--transition-slow);
}
.mobile-nav.open {
  display: flex;
}
.mobile-nav .nav-link {
  font-size: 1rem;
  padding: 12px 16px;
  border-radius: var(--radius-md);
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  padding: clamp(60px, 10vw, 120px) clamp(20px, 5vw, 80px);
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.section-label::before {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--accent-2);
  border-radius: 2px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding-top: calc(var(--nav-height) + 60px);
  position: relative;
  overflow: hidden;
  flex-wrap: wrap;
}
.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 320px;
}
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 80% 20%,
    var(--accent-2-light) 0%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 0;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--bg-tag);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.8);
  }
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 8px;
  animation: fadeUp 0.6s 0.1s ease both;
}
.hero-name-accent {
  color: var(--accent-2);
}
.hero-role {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: -0.3px;
  margin-bottom: 28px;
  animation: fadeUp 0.6s 0.2s ease both;
}
.hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 420px;
  margin-bottom: 40px;
  animation: fadeUp 0.6s 0.3s ease both;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.4s ease both;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--accent);
  color: var(--text-on-accent);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 1.5px solid var(--accent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.88;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 1.5px solid var(--border-strong);
}
.btn-secondary:hover {
  background: var(--bg-tag);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.hero-image-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
}
.hero-image-frame {
  position: relative;
  width: clamp(280px, 35vw, 440px);
  aspect-ratio: 4/5;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-lg);
}
.hero-image-deco {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 70%;
  height: 70%;
  border: 2px solid var(--accent-2);
  border-radius: var(--radius-xl);
  z-index: -1;
  opacity: 0.4;
}
.hero-stats {
  position: absolute;
  bottom: 20px;
  left: -30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 20px;
}
.hero-stat {
  text-align: center;
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}
.hero-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#about {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-top: 48px;
}
.exp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--transition),
    border-color var(--transition);
}
.exp-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.exp-role {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}
.exp-company {
  font-size: 0.9rem;
  color: var(--accent-2);
  margin: 4px 0;
  font-weight: 500;
}
.exp-duration {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.edu-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.edu-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.edu-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-2-light);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.75rem;
  flex-shrink: 0;
}
.edu-degree {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.edu-field {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.skills-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.skill-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--bg-tag);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.skill-pill:hover {
  background: var(--accent-2-light);
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-2px);
}
.skill-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

#projects {
  background: var(--bg-primary);
}
.projects-header {
  margin-bottom: 48px;
}
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.filter-tab {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font-body);
}
.filter-tab:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  animation: cardFadeIn 0.5s ease both;
}
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.project-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  transform: translateY(-4px);
}
.project-card.hidden {
  display: none;
}

.project-card-top {
  padding: 28px 28px 20px;
  flex: 1;
}
.project-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.badge-web {
  background: #eef3ff;
  color: #3b66e8;
}
.badge-desktop {
  background: #edfaf4;
  color: #1a9e5c;
}
.badge-testing {
  background: #fff8ee;
  color: #d97706;
}
.badge-extension {
  background: #f5eeff;
  color: #7c3aed;
}
.badge-ai {
  background: #fef0f0;
  color: #dc2626;
}

[data-theme="dark"] .badge-web {
  background: #1a2040;
  color: #6b9aff;
}
[data-theme="dark"] .badge-desktop {
  background: #0d2218;
  color: #4cca8c;
}
[data-theme="dark"] .badge-testing {
  background: #211a07;
  color: #f59e0b;
}
[data-theme="dark"] .badge-extension {
  background: #1e0f35;
  color: #a78bfa;
}
[data-theme="dark"] .badge-ai {
  background: #200e0e;
  color: #f87171;
}

.project-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.project-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}
.project-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tech-tag {
  padding: 4px 10px;
  background: var(--bg-tag);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.project-features {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.project-feature {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.feature-check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-2-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.project-card-bottom {
  padding: 18px 28px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-tag);
}
.project-link:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.project-link.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}
.project-link.primary:hover {
  opacity: 0.85;
}

.project-standout {
  margin: 14px 0 0;
  padding: 12px 14px;
  background: var(--accent-2-light);
  border-left: 3px solid var(--accent-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-style: italic;
}

#contact {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}
.contact-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.contact-inner .section-label {
  justify-content: center;
}
.contact-inner .section-label::before {
  display: none;
}
.contact-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 16px 0 40px;
  line-height: 1.75;
}
.contact-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.contact-link:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 28px clamp(20px, 5vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.footer-brand span {
  color: var(--accent-2);
}

@media (max-width: 900px) {
  #hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-height) + 40px);
    min-height: auto;
    padding-bottom: 60px;
  }
  .hero-image-wrap {
    justify-content: center;
    order: -1;
  }
  .hero-image-frame {
    width: 240px;
  }
  .hero-tagline {
    margin: 0 auto 40px;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    left: 50%;
    transform: translateX(-50%);
    bottom: -14px;
    white-space: nowrap;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

@media (max-width: 600px) {
  section {
    padding: 48px 20px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats {
    position: static;
    transform: none;
    margin-top: 60px;
    justify-content: center;
  }
  footer {
    flex-direction: column;
    text-align: center;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}

.icon {
  display: inline-block;
  vertical-align: middle;
}
