/* IT Student Portfolio – Base Styles */
:root {
  /* Dark mode (default) */
  --bg: #0f1419;
  --surface: #1a2332;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #3fb950;
  --accent-hover: #56d364;
  --border: #30363d;
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --space: 1rem;
  --radius: 8px;
}

[data-theme="light"] {
  /* Light mode */
  --bg: #ffffff;
  --surface: #f6f8fa;
  --text: #24292f;
  --text-muted: #57606a;
  --accent: #0969da;
  --accent-hover: #0860ca;
  --border: #d0d7de;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.75rem 1.25rem;
  clip: auto;
  overflow: visible;
  white-space: normal;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle:focus-visible,
.nav-toggle:focus-visible {
  outline-offset: 4px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 25, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.9);
}

.navbar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  letter-spacing: 0.5px;
}

.logo-first,
.logo-last {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 50%, var(--accent) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  animation: logoGradient 4s ease infinite, logoFloat 3s ease-in-out infinite;
  transition: all 0.3s ease;
}

.logo-first {
  animation-delay: 0s, 0s;
}

.logo-last {
  animation-delay: 0.5s, 0.3s;
}


@keyframes logoGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
}


.logo:hover .logo-first,
.logo:hover .logo-last {
  animation: logoGradient 4s ease infinite, logoFloat 3s ease-in-out infinite, logoBounce 0.6s ease;
  transform: scale(1.05);
}

@keyframes logoBounce {
  0%, 100% {
    transform: scale(1.05) translateY(0);
  }
  50% {
    transform: scale(1.15) translateY(-5px);
  }
}

.logo:active .logo-first,
.logo:active .logo-last {
  transform: scale(0.95);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.theme-toggle-nav-item {
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
  position: relative;
  width: 30px;
  height: 24px;
  z-index: 101;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text);
  left: 0;
  transition: transform 0.3s, top 0.3s;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

.theme-toggle-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.theme-toggle {
  position: relative;
  width: 50px;
  height: 26px;
  appearance: none;
  background: var(--border);
  border-radius: 13px;
  cursor: pointer;
  outline: none;
  transition: background 0.3s;
  margin: 0;
}

.theme-toggle:checked {
  background: var(--accent);
}

.theme-toggle::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  top: 2px;
  left: 2px;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle:checked::before {
  transform: translateX(24px);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hero */
.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 1.5rem;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  max-width: 700px;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.profile-image {
  width: 100%;
  max-width: 280px;
  height: auto;
  border-radius: 50%;
  border: 3px solid var(--accent);
  object-fit: cover;
  aspect-ratio: 1;
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.hero-desc {
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.btn-outline {
  margin-top: 1.5rem;
  color: var(--accent);
  font-weight: 600;
}

.btn-outline:hover {
  color: var(--accent-hover);
}

/* Sections */
section {
  padding: 4rem 1.5rem;
}

section h2 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
}

.section-desc {
  color: var(--text-muted);
  margin: 0 0 2rem;
}

.about-preview,
.skills,
.projects-preview {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.link-arrow {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 500;
}

/* Skills grid */
.skills-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.skills-grid li {
  padding: 0.6rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

/* Project cards */
.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.project-card:hover {
  border-color: var(--accent);
}

.project-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.project-card p {
  color: var(--text-muted);
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.card-link {
  font-size: 0.9rem;
  font-weight: 500;
}

/* CTA section */
.cta {
  text-align: center;
}

.cta p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  background: var(--surface);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Contact page */
.page-hero {
  padding: 4rem 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
}

.page-hero-desc {
  color: var(--text-muted);
  margin: 0;
  max-width: 560px;
}

.page-error .error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 12vw, 6rem);
  font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin: 0 0 0.75rem;
  letter-spacing: -0.05em;
}

.page-error .hero-cta {
  margin-top: 1.5rem;
}

.contact-section {
  padding: 3rem 1.5rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.contact-details {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.contact-details li {
  margin-bottom: 1rem;
}

.contact-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-details a {
  word-break: break-all;
}

.contact-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .btn {
  margin-top: 0.5rem;
}

/* About page */
.about-content {
  padding: 3rem 1.5rem;
}

.about-text h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

.about-text h2:first-child {
  margin-top: 0;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 700px;
}

.about-list {
  color: var(--text-muted);
  margin: 1rem 0;
  padding-left: 1.5rem;
  max-width: 700px;
}

.about-list li {
  margin-bottom: 0.5rem;
}

/* Projects page */
.projects-content {
  padding: 3rem 1.5rem;
}

.project-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.project-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.project-description {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  line-height: 1.7;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.project-score {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Resume page */
.resume-content {
  padding: 3rem 1.5rem;
}

.resume-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.resume-sidebar {
  position: sticky;
  top: 80px;
}

.resume-section {
  margin-bottom: 2rem;
}

.resume-section h2 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.resume-contact,
.resume-skills,
.resume-languages,
.resume-certifications {
  list-style: none;
  margin: 0;
  padding: 0;
}

.resume-contact li,
.resume-skills li,
.resume-languages li,
.resume-certifications li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.resume-contact a {
  color: var(--accent);
}

.resume-languages li,
.resume-certifications li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.proficiency {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.resume-main .resume-section h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
}

.resume-main .resume-section:first-child h2 {
  margin-top: 0;
}

.resume-item {
  margin-bottom: 2rem;
}

.resume-item-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.resume-item-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.resume-date {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.resume-location {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

.resume-bullets {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.resume-bullets li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.resume-summary {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 1rem;
}

.resume-subheading {
  margin: 1rem 0 0.5rem;
  font-weight: 600;
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .logo-first,
  .logo-last {
    animation: none;
  }

  .logo:hover .logo-first,
  .logo:hover .logo-last {
    animation: none;
    transform: none;
  }

  .logo:hover {
    transform: none;
  }
}
