/* ---------- Design tokens ---------- */
:root {
  --bg: #0a0e14;
  --bg-elevated: #10151f;
  --bg-card: #131924;
  --text-primary: #e6edf3;
  --text-secondary: #8b96a5;
  --accent: #64ffda;
  --accent-dim: rgba(100, 255, 218, 0.1);
  --border: #1e2733;
  --max-width: 1100px;
  --font-heading: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

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

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

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

ul { list-style: none; }

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

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(100,255,218,0.05), transparent 40%),
                     radial-gradient(circle at 80% 70%, rgba(100,255,218,0.04), transparent 40%);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
}

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

.nav-links {
  display: flex;
  gap: 2.25rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

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

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

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

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

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

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3.5rem;
  padding: 120px 0 3rem;
  position: relative;
  z-index: 1;
}

.hero-media { flex-shrink: 0; }

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

.eyebrow {
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 0.6rem;
}

.hero-desc {
  margin-top: 1.5rem;
  max-width: 620px;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.hero-desc .highlight {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-style: normal;
}

.social-icons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all 0.2s ease;
}

.icon-btn svg { width: 18px; height: 18px; }

.icon-btn:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
}

.profile-photo {
  border: 1px solid var(--border);
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.profile-photo.round {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-position: center 25%;
}

/* ---------- Sections ---------- */
.section {
  padding: 2.75rem 0;
  position: relative;
  z-index: 1;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 600;
  margin-bottom: 3rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  white-space: nowrap;
}

.section-title.centered {
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.section-num {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 500;
}

.skills-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 0.6rem 1.5rem;
  margin-top: 1.5rem;
}

.skills-list li {
  color: var(--text-primary);
  font-size: 0.92rem;
  position: relative;
  padding-left: 1.1rem;
}

.skills-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.project-top {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
}

.project-icon {
  color: var(--accent);
  font-size: 1.5rem;
}

.project-links {
  display: flex;
  gap: 0.9rem;
}

.project-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.project-links a:hover { color: var(--accent); }

.project-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex-grow: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tech-tags li {
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
}

/* ---------- Other Projects ---------- */
.other-projects {
  margin-top: 3.5rem;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

.other-projects-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.other-projects-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.other-projects-list li:last-child { border-bottom: none; }

.op-name {
  font-weight: 500;
  color: var(--text-primary);
}

.op-stack {
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex-grow: 1;
}

.other-projects-list a {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.other-projects-list a:hover { text-decoration: underline; }

/* ---------- Resume ---------- */
.resume-section { text-align: left; }

.resume-desc {
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 1.75rem;
}

.resume-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.resume-note code {
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--accent);
}

/* ---------- Contact ---------- */
.contact-section {
  text-align: center;
  max-width: 620px;
}

.contact-desc {
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.contact-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-row input,
.form-row textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s ease;
}

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

.contact-form .btn { align-self: flex-start; }

.form-status {
  font-size: 0.9rem;
  color: var(--accent);
  min-height: 1.2em;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
}

.social-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.social-links a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  .hero {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 2rem;
    padding-top: 110px;
  }

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

  .social-icons { justify-content: center; }

  .skills-list { justify-content: center; justify-items: center; }

  .profile-photo.round { width: 180px; height: 180px; }

  .nav-links {
    position: fixed;
    top: 72px;
    right: 0;
    height: calc(100vh - 72px);
    width: min(280px, 75vw);
    background: var(--bg-elevated);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 2.5rem 2rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }

  .nav-links.open { transform: translateX(0); }

  .nav-toggle { display: flex; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 500px) {
  .section { padding: 5rem 0; }
  .skills-list { grid-template-columns: 1fr; }
}
