/* ============================================================
   CUSTOM PROPERTIES (VARIABLES)
   ============================================================ */
:root {
  --color-accent: #960ac5;
  --color-accent-hover: #960ac5;
  --color-text: #030508;
  --color-text-light: #2e3033;
  --color-bg: #ffffff;
  --color-bg-alt: #c9a0d9;
  --color-border: #b78fc9;
  --color-error: #dc2626;

  --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
  --spacing: 1.5rem;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

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

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ============================================================
   UTILITY: SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 999;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   UTILITY: CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}

.logo:hover {
  text-decoration: none;
  color: var(--color-accent);
}

/* --- Hamburger button (hidden on desktop) --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px; }

/* Hamburger to X animation */
.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* --- Navigation list (desktop) --- */
.nav-list {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-light);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

/* ============================================================
   MOBILE NAVIGATION (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    padding: 5rem 2rem 2rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
    z-index: 105;
  }

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

  .nav-list {
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
  }

  .nav-link {
    font-size: 1.25rem;
    padding: 0.5rem 0;
  }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  text-decoration: none;
}

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

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

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

.btn-secondary:hover {
  background: var(--color-accent);
  color: #fff;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

/* ============================================================
   HERO (HOME PAGE)
   ============================================================ */
.hero {
  padding: 4rem 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.15rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.intro {
  color: var(--color-text-light);
  margin-bottom: 2rem;
  max-width: 55ch;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

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

.hero-image img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-border);
}

/* ============================================================
   PAGE HEADER (INNER PAGES)
   ============================================================ */
.page-header {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: 2.5rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.section p + p {
  margin-top: 1rem;
}

/* ============================================================
   SKILLS GRID (ABOUT PAGE)
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.skill-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.skill-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--color-accent);
}

.skill-card ul {
  padding-left: 1.25rem;
  list-style: disc;
  color: var(--color-text-light);
}

.skill-card li {
  margin-bottom: 0.35rem;
}

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

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

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.project-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

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

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.project-tech li {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-light);
}

.project-links {
  margin-top: auto;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: start;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group input.input-error,
.form-group textarea.input-error {
  border-color: var(--color-error);
}

.error-message {
  display: block;
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 0.3rem;
  min-height: 1.2em;
}

.form-note {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-light);
  background: var(--color-bg-alt);
  padding: 1rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--color-accent);
}

.form-note code {
  background: var(--color-border);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

.contact-info h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.contact-links li {
  margin-bottom: 0.75rem;
}

.contact-links a {
  font-size: 0.95rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

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

/* ============================================================
   RESPONSIVE: TABLET & MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .intro {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.75rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}