:root {
  --color-black: #000000;
  --color-dark-gray: #0a0a0a;
  --color-gray-text: #a0a0a0;
  --color-light-gray: #d1d1d1;
  --color-white: #ffffff;
  --color-yellow: #FFD700;
  --color-yellow-dark: #f0c400;
  --color-yellow-glow: rgba(255, 215, 0, 0.6);
  --color-yellow-glow-lg: rgba(255, 215, 0, 0.7);

  --font-sans: 'Inter', sans-serif;
  --font-mono: 'Chivo Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Header height */
}

body {
  background-color: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-sans);
  background-image: 
    linear-gradient(rgba(255, 215, 0, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.07) 1px, transparent 1px);
  background-size: 2rem 2rem;
  background-position: center center;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-dark-gray);
}
::-webkit-scrollbar-thumb {
  background: var(--color-yellow);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-yellow-dark);
}

.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

section {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
@media (min-width: 768px) {
  section {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

.section-title {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1rem;
}
.section-title__accent {
  color: var(--color-yellow);
}
@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-subtitle {
  color: var(--color-gray-text);
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 3rem auto;
}

/* --- HEADER --- */
.header {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header__logo {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.3s ease;
}
.header__logo:hover {
  color: var(--color-yellow);
}

.header__nav {
  display: none;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 768px) {
  .header__nav {
    display: flex;
  }
}

.header__nav-link {
  font-family: var(--font-mono);
  color: var(--color-white);
  text-decoration: none;
  transition: color 0.3s ease;
}
.header__nav-link:hover {
  color: var(--color-yellow);
}

.header__menu-toggle {
  display: block;
  background: none;
  border: 1px solid transparent;
  color: var(--color-white);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
}
.header__menu-toggle .icon-close { display: none; }
.header__menu-toggle.active .icon-open { display: none; }
.header__menu-toggle.active .icon-close { display: block; }
@media (min-width: 768px) {
  .header__menu-toggle {
    display: none;
  }
}

.header__mobile-menu {
  display: none;
  background-color: rgba(0, 0, 0, 0.95);
}
.header__mobile-menu.active {
  display: block;
}
.header__mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  gap: 1rem;
}

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero__deco-corner--tl, .hero__deco-corner--br {
  position: absolute;
  width: 8rem;
  height: 8rem;
  border-color: rgba(255, 215, 0, 0.3);
}
.hero__deco-corner--tl { top: 0; left: 0; border-top: 4px solid; border-left: 4px solid; }
.hero__deco-corner--br { bottom: 0; right: 0; border-bottom: 4px solid; border-right: 4px solid; }

.hero__container {
  max-width: 56rem;
  z-index: 10;
}

.hero__title {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-white);
  margin-bottom: 4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  height: 7rem;
}
@media (min-width: 768px) {
  .hero__title { font-size: 4.5rem; height: 12rem; }
}
@media (min-width: 1024px) {
  .hero__title { font-size: 5rem; height: 14rem; }
}

.typewriter-cursor {
  display: inline-block;
  width: 0.75em;
  height: 1.1em;
  background-color: var(--color-yellow);
  animation: blink 0.7s infinite;
  vertical-align: bottom;
  margin-left: 0.1em;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- BUTTON --- */
.btn {
  position: relative;
  display: inline-block;
  background-color: transparent;
  color: var(--color-yellow);
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 1.125rem;
  padding: 1rem 2rem;
  border: 2px solid var(--color-yellow);
  border-radius: 2px;
  text-decoration: none;
  overflow: hidden;
  transition: color 0.3s ease;
}
.btn__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-yellow);
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
}
.btn__text {
  position: relative;
  z-index: 10;
}
.btn:hover {
  color: var(--color-black);
}
.btn:hover .btn__bg {
  transform: translateX(0);
}

/* --- PROJECTS --- */
.projects {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .projects__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .projects__grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card {
  position: relative;
  overflow: hidden;
  background-color: rgba(30, 30, 30, 0.5);
  border: 1px solid rgba(128, 128, 128, 0.5);
  padding: 0.25rem;
  transition: all 0.3s ease;
}
.project-card:hover {
  border-color: rgba(255, 215, 0, 0.8);
  box-shadow: 0 0 15px var(--color-yellow-glow);
}

.project-card__image-wrapper {
  position: relative;
  overflow: hidden;
}
.project-card__image {
  width: 100%;
  height: 15rem;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card:hover .project-card__image {
  transform: scale(1.1);
}
.project-card__image-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
}

.project-card__content {
  padding: 1.5rem;
}

.project-card__title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.project-card__description {
  color: var(--color-gray-text);
  margin-bottom: 1rem;
  height: 3rem; /* Fixed height for alignment */
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.project-card__tag {
  background-color: rgba(255, 215, 0, 0.1);
  color: var(--color-yellow);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
}

.project-card__deco-corners {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.project-card:hover .project-card__deco-corners {
  opacity: 1;
}
.project-card__deco-corners span {
  position: absolute;
  width: 1rem;
  height: 1rem;
  border-color: var(--color-yellow);
}
.project-card__deco-corners span:nth-child(1) { top: 0.5rem; left: 0.5rem; border-top: 2px solid; border-left: 2px solid; }
.project-card__deco-corners span:nth-child(2) { top: 0.5rem; right: 0.5rem; border-top: 2px solid; border-right: 2px solid; }
.project-card__deco-corners span:nth-child(3) { bottom: 0.5rem; left: 0.5rem; border-bottom: 2px solid; border-left: 2px solid; }
.project-card__deco-corners span:nth-child(4) { bottom: 0.5rem; right: 0.5rem; border-bottom: 2px solid; border-right: 2px solid; }

/* --- ABOUT --- */
.about {
  background-color: var(--color-black);
}
.about__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}
@media (min-width: 768px) {
  .about__container {
    flex-direction: row;
    gap: 5rem;
  }
}

.about__image-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  padding: 0.5rem;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
@media (min-width: 768px) {
  .about__image-container { flex-basis: 40%; max-width: none; }
}

.about__image-bg {
  position: absolute;
  inset: 0;
  background-color: var(--color-yellow);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.about__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 10;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.about__content {
  text-align: center;
}
@media (min-width: 768px) {
  .about__content { flex-basis: 60%; text-align: left; }
  .about__content .section-title { text-align: left; }
}
.about__content p {
  color: var(--color-light-gray);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.about__content .btn {
  margin-top: 1rem;
}

/* --- RESUME --- */
.resume {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.resume .section-title { margin-bottom: 3rem; }

.resume__content {
  max-width: 56rem;
  margin: 0 auto;
  text-align: left;
}

.resume__category {
  margin-bottom: 4rem;
}

.resume__category-title {
  font-family: var(--font-mono);
  color: var(--color-yellow);
  font-size: 1.875rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}

.timeline__item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 3rem;
}
.timeline__item::before { /* Timeline line */
  content: '';
  position: absolute;
  left: 0;
  top: 0.4rem;
  height: 100%;
  width: 1px;
  background-color: #333;
}
.timeline__item::after { /* Timeline diamond */
  content: '';
  position: absolute;
  left: -8px;
  top: 0.25rem;
  height: 1rem;
  width: 1rem;
  background-color: var(--color-yellow);
  box-shadow: 0 0 15px var(--color-yellow-glow);
  transform: rotate(45deg);
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item:last-child::before { display: none; }

.timeline__item-title {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--color-white);
}
.timeline__item-subtitle {
  color: var(--color-yellow);
  font-size: 1.125rem;
  font-weight: 600;
}
.timeline__item-period {
  font-family: var(--font-mono);
  color: var(--color-gray-text);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.timeline__item-description {
  color: var(--color-light-gray);
  line-height: 1.6;
}
.resume__download {
  text-align: center;
  margin-top: 4rem;
}

/* --- CONTACT --- */
.contact {
  background-color: var(--color-black);
}
.contact__container {
  text-align: center;
}
.contact__email {
  display: inline-block;
  margin-bottom: 3rem;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-yellow);
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.3s ease;
}
.contact__email:hover {
  color: var(--color-yellow-dark);
}
@media (min-width: 768px) {
  .contact__email { font-size: 2rem; }
}
.contact__socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
}
.contact__social-link {
  color: var(--color-gray-text);
  transition: all 0.3s ease;
}
.contact__social-link:hover {
  color: var(--color-yellow);
  filter: drop-shadow(0 0 8px var(--color-yellow-glow));
}

/* --- FOOTER --- */
.footer {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 215, 0, 0.1);
}
.footer__container {
  text-align: center;
  color: #6b7280; /* text-gray-500 */
}
.footer__container p {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
