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

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #141414;
  --bg-tertiary: #1a1a1a;

  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --accent-dim: #0891b2;
  --accent-glow: rgba(6, 182, 212, 0.15);

  --text: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;

  --border: #262626;

  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max-width: 1100px;
  --header-height: 64px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

::selection {
  background-color: var(--accent);
  color: var(--bg-primary);
}

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

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

ul {
  list-style: none;
}

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

.section {
  padding: 6rem 0;
}

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

/* ===== Section Heading ===== */
.section-heading {
  text-align: center;
  margin-bottom: 4rem;
}

.section-heading__bar {
  width: 3rem;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin: 0 auto 1rem;
}

.section-heading__title {
  font-size: 2rem;
  font-weight: 700;
}

.section-heading__subtitle {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

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

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent-light);
  transition: color 0.2s;
}

.header__logo:hover {
  color: var(--accent);
}

.header__nav {
  display: flex;
  gap: 2rem;
}

.header__link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
}

.header__link:hover,
.header__link.active {
  color: var(--accent-light);
}

.header__link.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger__line {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
  border-radius: 1px;
}

.hamburger.open .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open .hamburger__line:nth-child(2) {
  opacity: 0;
}

.hamburger.open .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav__link {
  display: block;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.mobile-nav__link:hover {
  color: var(--accent-light);
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}

.hero__pretitle {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-light);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

.hero__name {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease-out 0.1s forwards;
}

.hero__title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--accent-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease-out 0.2s forwards;
}

.hero__tagline {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.6s ease-out 0.3s forwards;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease-out 0.4s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
}

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

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

.btn--outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

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

.hero__scroll {
  margin-top: 4rem;
  opacity: 0;
  animation: fadeIn 0.6s ease-out 0.6s forwards;
}

.hero__scroll svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  animation: bounce 2s infinite;
}

/* ===== About ===== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.about__image {
  aspect-ratio: 1;
  background: var(--bg-card);
  border-radius: 1rem;
  border: 2px solid rgba(6, 182, 212, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.about__image-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about__location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-light);
  margin-top: 1.5rem;
}

.about__location svg {
  width: 16px;
  height: 16px;
}

/* ===== Skills ===== */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.skill-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.skill-card__icon {
  margin-bottom: 0.75rem;
  color: var(--accent);
  text-align: center;
}

.skill-card {
  text-align: center;
}

.skill-card__icon svg {
  width: 44px;
  height: 44px;
  margin: 0 auto;
}

.skill-card__name {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.skill-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.tag--accent {
  background: transparent;
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--accent-light);
}

/* ===== Projects ===== */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

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

.project-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.project-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.project-card__role {
  display: block;
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: #9ca3af;
  margin-top: 0.2rem;
}

.project-card:hover .project-card__title {
  color: var(--accent-light);
}

.project-card__desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-card__highlights {
  margin-bottom: 1rem;
  flex: 1;
}

.project-card__highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.project-card__highlight::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

/* ===== Experience ===== */
.timeline {
  max-width: 42rem;
  margin: 0 auto;
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 3rem;
  border-left: 2px solid rgba(6, 182, 212, 0.2);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item__dot {
  position: absolute;
  left: -7px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-item__period {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--accent-light);
  margin-bottom: 0.25rem;
}

.timeline-item__role {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.timeline-item__company {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.timeline-item__desc {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.timeline-item__highlights {
  margin-bottom: 0.75rem;
}

.timeline-item__highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.timeline-item__highlight::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.5);
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.timeline-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ===== Testimonials ===== */
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.testimonial-card__quote-mark {
  font-size: 2.5rem;
  line-height: 1;
  color: rgba(6, 182, 212, 0.3);
  margin-bottom: 0.5rem;
}

.testimonial-card__text {
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.testimonial-card__author {
  font-weight: 600;
}

.testimonial-card__role {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== Contact ===== */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.form__group {
  margin-bottom: 1.5rem;
}

.form__label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form__input,
.form__textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color 0.2s;
  outline: none;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--accent);
}

.form__textarea {
  resize: none;
  min-height: 8rem;
}

.form__status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.form__status--success {
  color: #4ade80;
}

.form__status--error {
  color: #f87171;
}

.contact-info__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.contact-info__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

a.contact-info__item:hover {
  color: var(--accent-light);
}

.contact-info__item svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-info__socials {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.contact-info__note {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__link {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer__link:hover {
  color: var(--accent-light);
}

/* ===== Animations ===== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header__nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

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

  .about__image {
    max-width: 280px;
    margin: 0 auto;
  }

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

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

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

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

  .footer__inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .section-heading__title {
    font-size: 1.75rem;
  }
}
