/* ── Custom Properties ── */
:root {
  --bg:        #0f1117;
  --surface:   #1a1d27;
  --surface2:  #22263a;
  --accent:    #6c63ff;
  --accent-dim:#4b44cc;
  --text:      #e2e8f0;
  --text-muted:#8892a4;
  --border:    #2d3148;
  --radius:    10px;
  --nav-h:     64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Nav ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.btn-resume {
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent) !important;
  font-size: 0.85rem !important;
  font-weight: 600;
  transition: background 0.2s, color 0.2s !important;
}
.btn-resume:hover {
  background: var(--accent);
  color: #fff !important;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 2rem) 5% 4rem;
  position: relative;
}
.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}
.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.05;
  background: linear-gradient(135deg, #fff 30%, #a89fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}
.hero-tagline {
  font-size: clamp(0.95rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}
.hero-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.icon-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.icon-link:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(108, 99, 255, 0.08);
}
.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(5px); }
}

/* ── Sections ── */
section, footer {
  padding: 5rem 5%;
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  display: block;
  height: 3px;
  width: 40px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.5rem;
}

/* ── About ── */
#about { background: var(--surface); }
.about-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.8;
  margin-bottom: 1rem;
}
.about-text:last-child { margin-bottom: 0; }

/* ── Projects Grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.15);
}
.card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card-icon { font-size: 1.3rem; }
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(108, 99, 255, 0.12);
  color: #a89fff;
  border: 1px solid rgba(108, 99, 255, 0.25);
  letter-spacing: 0.02em;
}
.card-links {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.25rem;
}
.card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
.card-link:hover {
  background: var(--accent);
  color: #fff;
}
.card-link-alt {
  color: var(--text-muted);
  border-color: var(--border);
}
.card-link-alt:hover {
  background: var(--surface2);
  color: var(--text);
}

/* ── Featured Card ── */
.featured-card {
  display: flex;
  gap: 3rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.featured-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 40px rgba(108,99,255,0.15);
}
.featured-left { flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.featured-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.featured-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.featured-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 560px;
}
.featured-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.featured-links { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 0.5rem; }
.btn-featured {
  padding: 0.6rem 1.4rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.15s;
}
.btn-featured:hover { background: var(--accent-dim); transform: translateY(-2px); }
.featured-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 200px;
}
.featured-ext {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
@media (max-width: 700px) {
  .featured-card { flex-direction: column; }
  .featured-right { width: 100%; }
  .featured-ext { text-align: center; }
}

/* ── Footer / Contact ── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-text {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.btn-contact {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
  margin-bottom: 2.5rem;
}
.btn-contact:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
}
.footer-links {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
  opacity: 0.6;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 5%;
    gap: 1.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .footer-links { gap: 1.25rem; }
}
