:root {
  --bg: #f7f7fb;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --border: #e6e5f2;
  --text: #15151f;
  --text-muted: #62626f;
  --accent: #049a9e;
  --accent-2: #0f2b47;
  --accent-warm: #ff5f5f;
  --accent-soft: rgba(4, 154, 158, 0.1);
  --gradient: linear-gradient(120deg, var(--accent-2) 0%, var(--accent) 100%);
  --font-head: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;
  --radius: 16px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  width: 100%;
  background: url("assets/network-pattern.svg") repeat, var(--bg);
  background-size: 900px 900px;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { color: var(--text-muted); margin: 0 0 16px; }

a { color: var(--accent); text-decoration: none; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-tag {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  margin: 0 0 12px;
}

.section-tag::before { content: "// "; color: var(--accent-2); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 247, 251, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 34px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.main-nav a:hover { color: var(--text); }

.nav-cta {
  color: #fff !important;
  background: var(--gradient);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600 !important;
}

.nav-cta:hover { opacity: 0.9; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Quick nav (dot menu) */

.quick-nav {
  position: fixed;
  top: 96px;
  right: 24px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.quick-nav.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.quick-nav-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--gradient);
  box-shadow: 0 14px 28px -10px rgba(4, 154, 158, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.quick-nav-toggle:hover,
.quick-nav-toggle[aria-expanded="true"] {
  transform: scale(1.08);
  box-shadow: 0 16px 32px -8px rgba(4, 154, 158, 0.55);
}

.quick-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.quick-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.quick-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.quick-nav-menu {
  position: absolute;
  top: 0;
  right: 60px;
  transform: translateX(8px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 24px 48px -24px rgba(21, 21, 31, 0.3);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}

.quick-nav-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.quick-nav-menu a {
  display: block;
  text-align: right;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 8px;
}

.quick-nav-menu a:hover,
.quick-nav-menu a.active {
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 720px) {
  .quick-nav { display: none; }
}

/* Hero */

.hero {
  position: relative;
  padding: 64px 0 90px;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

.blob-1 {
  width: 460px;
  height: 460px;
  background: var(--accent);
  top: -180px;
  right: -140px;
}

.blob-2 {
  width: 420px;
  height: 420px;
  background: var(--accent-2);
  bottom: -260px;
  left: -120px;
  opacity: 0.28;
}

.blob-3 {
  width: 400px;
  height: 400px;
  background: var(--accent-2);
  top: -200px;
  right: -100px;
  opacity: 0.22;
}

.blob-4 {
  width: 380px;
  height: 380px;
  background: var(--accent);
  top: -180px;
  left: -120px;
  opacity: 0.25;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

.hero-lead {
  font-size: 1.1rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(4, 154, 158, 0.45);
}

.btn-primary:hover { opacity: 0.94; }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-small { padding: 11px 22px; font-size: 0.9rem; }

/* Terminal card */

.hero-visual { display: flex; justify-content: center; }

.terminal-card {
  width: 100%;
  max-width: 440px;
  background: #14141f;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(21, 21, 31, 0.35);
  transform: rotate(2deg);
}

.terminal-bar {
  display: flex;
  gap: 8px;
  padding: 14px 18px;
  background: #1d1d2b;
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3a4a;
}

.terminal-bar span:nth-child(1) { background: var(--accent-warm); }
.terminal-bar span:nth-child(2) { background: #ffc94d; }
.terminal-bar span:nth-child(3) { background: var(--accent); }

.terminal-body {
  margin: 0;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.9;
  color: #d6d6ea;
  overflow-x: auto;
}

.terminal-body .ok { color: var(--accent); font-weight: 600; }

/* Sections */

.section { padding: 96px 0; position: relative; }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.split-text { max-width: 640px; }

.check-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  align-self: center;
  box-shadow: 0 24px 48px -30px rgba(15, 43, 71, 0.2);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.check-list li {
  color: var(--text);
  padding-left: 30px;
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(21, 21, 31, 0.18);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-1 { background: linear-gradient(135deg, #0f2b47, #26547d); }
.icon-2 { background: linear-gradient(135deg, #049a9e, #4fd8d3); }
.icon-3 { background: linear-gradient(135deg, #0f2b47, #049a9e); }

.card p { margin-bottom: 0; }

/* Portfolio */

.portfolio-item {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.browser-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 50px -24px rgba(21, 21, 31, 0.25);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.browser-bar span:nth-child(1) { background: var(--accent-warm); }
.browser-bar span:nth-child(2) { background: #ffc94d; }
.browser-bar span:nth-child(3) { background: var(--accent); }

.browser-url {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 12px;
  border-radius: 999px;
}

.browser-body {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(15, 43, 71, 0.25), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(4, 154, 158, 0.2), transparent 60%),
    #0f1016;
}

.portfolio-content h3 { margin-bottom: 12px; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}

.tag-list span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 16px;
}

.step p { font-size: 0.95rem; margin-bottom: 0; }

/* Contact */

.contact-email {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  display: inline-block;
  margin-top: 8px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 24px 50px -30px rgba(21, 21, 31, 0.2);
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.hidden-field { display: none; }

.form-note {
  font-size: 0.85rem;
  min-height: 1em;
  margin: 0;
}

/* Legal page */

.legal {
  padding: 64px 0 96px;
}

.legal-container {
  max-width: 760px;
}

.legal .back-link {
  display: inline-block;
  margin-bottom: 32px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.legal .back-link:hover { color: var(--accent); }

.legal .updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 1.3rem;
  margin: 44px 0 12px;
}

.legal p, .legal li { color: var(--text-muted); }

.legal ul {
  padding-left: 22px;
  margin: 12px 0;
}

.legal li { margin: 6px 0; }

.legal strong { color: var(--text); }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner a { color: var(--text-muted); }
.footer-inner a:hover { color: var(--accent); }

.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Cookie bar */

.cookie-bar {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: -200px;
  z-index: 100;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: 0 24px 50px -20px rgba(15, 43, 71, 0.35);
  transition: bottom 0.3s ease;
}

.cookie-bar.visible { bottom: 24px; }

.cookie-bar p {
  flex: 1 1 320px;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cookie-bar p a { color: var(--accent); }

/* Responsive */

@media (min-width: 720px) {
  .split { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
}

@media (max-width: 900px) {
  .portfolio-item { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    transform: translateY(-150%);
    transition: transform 0.25s ease;
  }

  .main-nav.open { transform: translateY(0); }

  .nav-toggle { display: flex; }

  .hero { padding: 40px 0 56px; }

  .terminal-card { transform: none; }
}

@media (max-width: 480px) {
  .blob {
    filter: blur(60px);
  }

  .blob-1 { width: 280px; height: 280px; top: -100px; right: -80px; }
  .blob-2 { width: 260px; height: 260px; bottom: -160px; left: -70px; }
  .blob-3 { width: 240px; height: 240px; top: -120px; right: -60px; }
  .blob-4 { width: 240px; height: 240px; top: -110px; left: -70px; }
}
