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

:root {
  --bg:        #0c0c0e;
  --bg-2:      #111114;
  --bg-3:      #18181d;
  --border:    rgba(255,255,255,0.08);
  --text:      #e8e8ec;
  --text-muted:#888896;
  --text-dim:  #555566;
  --accent:    #6366f1;
  --accent-2:  #818cf8;
  --accent-dim:rgba(99,102,241,0.12);
  --green:     #22c55e;
  --radius:    8px;
  --radius-lg: 16px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --max-w:     1100px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--text); }

/* ─── Layout ────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

section { padding: 96px 0; }

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.75;
}

/* ─── Nav ───────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  background: rgba(12,12,14,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--accent-2); }

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

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* Language switcher */
.lang-switch {
  display: flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-switch button {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.lang-switch button:hover {
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
}

.lang-switch button.active {
  color: var(--accent-2);
  background: var(--accent-dim);
}

/* ─── Hero ──────────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 60px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 14px;
  margin-bottom: 28px;
}

.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 24px;
}

h1 .gradient {
  background: linear-gradient(135deg, var(--accent-2) 0%, #a78bfa 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 40px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); transform: translateY(-1px); }

/* ─── Projects ──────────────────────────────────────────────────── */
#projects { background: var(--bg-2); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.project-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.project-card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-2px); }
.project-card:hover::before { opacity: 1; }

.project-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  background: var(--accent-dim);
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.status-live { background: rgba(34,197,94,0.1); color: var(--green); }
.status-dev  { background: rgba(251,191,36,0.1); color: #fbbf24; }
.status-plan { background: rgba(99,102,241,0.1); color: #818cf8; }

.project-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text);
}

.project-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent-2);
  border: 1px solid rgba(99,102,241,0.15);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent-2);
  margin-top: 20px;
  font-weight: 500;
  transition: gap 0.15s;
}
.project-link:hover { gap: 10px; color: var(--text); }

/* ─── Philosophy ────────────────────────────────────────────────── */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.principle {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--bg-2);
  transition: border-color 0.2s;
}

.principle:hover { border-color: rgba(99,102,241,0.25); }

.principle-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent-2);
  margin-bottom: 12px;
  opacity: 0.7;
}

.principle h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.principle p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── Stack ─────────────────────────────────────────────────────── */
#stack { background: var(--bg-2); }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 48px;
}

.stack-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-3);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

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

.stack-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ─── Contact ───────────────────────────────────────────────────── */
#contact {
  text-align: center;
}

.contact-card {
  max-width: 680px;
  margin: 48px auto 0;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
}

.contact-card p {
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.75;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all 0.15s;
}

.contact-link:hover {
  border-color: rgba(99,102,241,0.4);
  color: var(--accent-2);
  background: var(--accent-dim);
}

/* ─── Footer ────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-muted); }

/* ─── Divider ───────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0;
}

/* ─── Assignments ───────────────────────────────────────────────── */
#assignments { background: var(--bg); }

.assignments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

.assignment-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.assignment-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.assignment-card:hover { border-color: rgba(99,102,241,0.3); transform: translateY(-2px); }
.assignment-card:hover::before { opacity: 1; }

.assignment-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.assignment-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  background: var(--accent-dim);
}

.assignment-meta { flex: 1; min-width: 0; }

.assignment-meta h3 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 4px;
}

.assignment-client {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.assignment-header .project-status {
  margin-bottom: 0;
  align-self: flex-start;
  flex-shrink: 0;
}

.assignment-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* ─── Contact Form ──────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  width: 100%;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.form-submit { align-self: flex-start; }

.form-status {
  font-size: 0.875rem;
  padding: 10px 14px;
  border-radius: var(--radius);
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(34,197,94,0.1);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.2);
}

.form-status.error {
  display: block;
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}

.contact-divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .nav-links { display: none; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .form-row { grid-template-columns: 1fr; }
  .form-submit { width: 100%; justify-content: center; }
}
