/* GENERAL */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

/* Theme tokens — edit light defaults in :root, dark overrides in [data-theme="dark"] */
:root {
  color-scheme: light;
  --color-bg: #fafafa;
  --color-surface: rgb(235, 250, 255);
  --color-text: #000000;
  --color-text-muted: rgb(85, 85, 85);
  --color-border: rgb(163, 163, 163);
  --color-border-strong: rgb(53, 53, 53);
  --color-link: #000000;
  --color-link-hover: grey;
  --color-link-underline: rgb(181, 181, 181);
  --color-nav-decoration: #ffffff;
  --color-accent: rgb(53, 53, 53);
  --color-accent-hover: rgb(0, 0, 0);
  --color-btn-on-accent: #ffffff;
  --color-btn-ghost-hover-border: rgb(255, 255, 255);
  --color-hamburger: #000000;
  --color-menu-bg: #ffffff;
  --shadow-hover: 0 0.25rem 0.65rem rgba(0, 0, 0, 0.12);
  --shadow-hover-strong: 0 0.35rem 0.9rem rgba(0, 0, 0, 0.18);
  /* Project “TV” frame (dark plastic; reads as a screen in both themes) */
  --tv-bezel-top: #5c5c5c;
  --tv-bezel-mid: #2e2e2e;
  --tv-bezel-bottom: #1a1a1a;
  --tv-screen-matte: #0a0a0a;
  --tv-stand: #252525;
  --tv-stand-foot: #1c1c1c;
  --details-glow-hover: 0 0.4rem 1rem rgba(0, 0, 0, 0.08), 0 0 1.75rem rgba(70, 110, 200, 0.28);
}

[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #1e1e34;
  --color-surface: #1c2753;
  --color-text: #e8e8e8;
  --color-text-muted: #a0a0a0;
  --color-border: #444444;
  --color-border-strong: #666666;
  --color-link: #e8e8e8;
  --color-link-hover: #b0b0b0;
  --color-link-underline: #666666;
  --color-nav-decoration: #121212;
  --color-accent: #c4c4c4;
  --color-accent-hover: #e8e8e8;
  --color-btn-on-accent: #121212;
  --color-btn-ghost-hover-border: #e8e8e8;
  --color-hamburger: #e8e8e8;
  --color-menu-bg: #1e1e1e;
  --shadow-hover: 0 0.35rem 0.85rem rgba(0, 0, 0, 0.45);
  --shadow-hover-strong: 0 0.45rem 1.1rem rgba(0, 0, 0, 0.55);
  --tv-bezel-top: #6a6a6a;
  --tv-bezel-mid: #3a3a3a;
  --tv-bezel-bottom: #222222;
  --tv-screen-matte: #050505;
  --tv-stand: #2e2e2e;
  --tv-stand-foot: #202020;
  --details-glow-hover: 0 0.45rem 1.2rem rgba(0, 0, 0, 0.45), 0 0 2rem rgba(140, 175, 255, 0.22);
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
}

p {
  color: var(--color-text-muted);
}

/* TRANSITION */

a,
.btn {
  transition: all 300ms ease;
}

/* Theme toggle (nav) */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  color: var(--color-text);
  background: var(--color-surface);
  border: 0.1rem solid var(--color-border);
  border-radius: 2rem;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 200ms ease,
    box-shadow 200ms ease;
}

.theme-toggle:hover {
  border-color: var(--color-border-strong);
  background: var(--color-bg);
  color: var(--color-text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.theme-toggle:active {
  transform: translateY(0);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.theme-toggle .theme-toggle__icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle .theme-toggle__icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

html[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

html[data-theme="light"] .theme-toggle__icon--moon {
  display: block;
}

html[data-theme="dark"] .theme-toggle__icon--sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle__icon--moon {
  display: none;
}

/* DESKTOP NAV */

nav,
.nav-links {
  display: flex;
}

nav {
  justify-content: space-around;
  align-items: center;
  height: 17vh;
}

.nav-links-container-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  gap: 2rem;
  list-style: none;
  font-size: 1.5rem;
}

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

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
  text-underline-offset: 1rem;
  text-decoration-color: var(--color-link-underline);
}

.logo {
  font-size: 2rem;
  color: var(--color-text);
}

.logo:hover {
  cursor: default;
}

/* HAMBURGER MENU */

#hamburger-nav {
  display: none;
}

.hamburger-nav-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--color-hamburger);
  transition: all 0.3s ease-in-out;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: var(--color-menu-bg);
  width: fit-content;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.menu-links a {
  display: block;
  padding: 10px;
  text-align: center;
  font-size: 1.5rem;
  color: var(--color-link);
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

.menu-links li {
  list-style: none;
}

.menu-links.open {
  max-height: 300px;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(10px, 5px);
}

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

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(10px, -5px);
}

.hamburger-icon span:first-child {
  transform: none;
  opacity: 1;
}

/* SECTIONS */

section {
  padding-top: 4vh;
  height: 96vh;
  margin: 0 10rem;
  box-sizing: border-box;
  min-height: fit-content;
}

.section-container {
  display: flex;
  /* width: 400px; */
  /* height: 1000px; */
}

/* PROFILE SECTION */

#profile {
  display: flex;
  justify-content: center;
  gap: 5rem;
  height: 80vh;
}

.section__pic-container {
  display: flex;
  height: 400px;
  width: 400px;
  margin: auto 0;
}

.section__text {
  align-self: center;
  text-align: center;
}

.section__text p {
  font-weight: 600;
}

.section__text__p1 {
  text-align: center;
}

.section__text__p2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.profile-typing {
  text-align: center;
}

.profile-typing__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35em;
  min-width: 19ch;
  max-width: 100%;
}

.profile-typing__text {
  text-align: left;
}

.profile-typing__cursor {
  display: inline-block;
  width: 0.12rem;
  height: 1.05em;
  margin-left: 0.12rem;
  background-color: var(--color-accent);
  vertical-align: -0.08em;
  animation: profile-typing-cursor 1s step-end infinite;
}

@keyframes profile-typing-cursor {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-typing__cursor {
    display: none;
  }
}

.title {
  font-size: 3rem;
  text-align: center;
  color: var(--color-text);
}

#socials-container {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

/* ICONS — inline SVG sprite in index.html (sources: simple-icons@11, lucide-static@0.460.0 on jsDelivr) */

.icon {
  cursor: pointer;
  height: 2rem;
}

.icon-svg {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  color: var(--color-text);
  vertical-align: middle;
}

.icon-svg use {
  pointer-events: none;
}

#socials-container .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  padding: 0.45rem;
  border-radius: 2rem;
  text-decoration: none;
  transition: transform 200ms ease, color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

#socials-container .social-link:hover {
  color: var(--color-link-hover);
  background-color: var(--color-surface);
  transform: translateY(-3px) scale(1.06);
  box-shadow: var(--shadow-hover-strong);
  text-decoration: none;
}

#socials-container .social-link:active {
  transform: translateY(-1px) scale(1.03);
}

.arrow.arrow-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--color-text);
  cursor: pointer;
  border-radius: 0.35rem;
  transition: transform 200ms ease, color 200ms ease, filter 200ms ease;
}

.arrow.arrow-btn:hover {
  color: var(--color-link-hover);
  transform: translateY(3px);
  filter: drop-shadow(0 0.15rem 0.25rem rgba(0, 0, 0, 0.2));
}

[data-theme="dark"] .arrow.arrow-btn:hover {
  filter: drop-shadow(0 0.2rem 0.45rem rgba(0, 0, 0, 0.5));
}

.arrow.arrow-btn:active {
  transform: translateY(5px);
}

.arrow.arrow-btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

/* BUTTONS */

.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  font-weight: 600;
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease, border-color 200ms ease,
    color 200ms ease;
  padding: 1rem;
  width: 8rem;
  border-radius: 2rem;
}

.btn-color-1,
.btn-color-2 {
  border: var(--color-border-strong) 0.1rem solid;
  color: var(--color-text);
}

.btn-color-1:hover,
.btn-color-2:hover {
  cursor: pointer;
}

.btn-color-1,
.btn-color-2:hover {
  background: var(--color-accent);
  color: var(--color-btn-on-accent);
}

.btn-color-1:hover {
  background: var(--color-accent-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover-strong);
}

.btn-color-1:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-color-2 {
  background: none;
}

.btn-color-2:hover {
  border: var(--color-btn-ghost-hover-border) 0.1rem solid;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover-strong);
}

.btn-color-2:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-container {
  gap: 1rem;
}

/* ABOUT SECTION */

#about {
  position: relative;
}

.about-containers {
  gap: 2rem;
  margin-bottom: 2rem;
  margin-top: 2rem;
}

.about-details-container {
  justify-content: center;
  flex-direction: column;
}

.about-containers,
.about-details-container {
  display: flex;
  /* height: 200px; */
}

.about-pic {
  border-radius: 2rem;
}

.arrow {
  position: absolute;
  right: -5rem;
  bottom: 2.5rem;
}

.details-container {
  padding: 1.5rem;
  flex: 1;
  background: var(--color-surface);
  border-radius: 2rem;
  border: var(--color-border-strong) 0.1rem solid;
  border-color: var(--color-border);
  text-align: center;
  box-shadow: none;
  transition: box-shadow 280ms ease, border-color 280ms ease;
}

.details-container:hover {
  box-shadow: var(--details-glow-hover);
  border-color: var(--color-border-strong);
}

.section-container {
  gap: 4rem;
  height: 80%;
}

.section__pic-container {
  height: 400px;
  width: 400px;
  margin: auto 0;
}

/* EXPERIENCE SECTION */

#experience {
  position: relative;
}

.experience-sub-title {
  margin-top: 0;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

.experience-details-container {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.article-container {
  display: flex;
  text-align: initial;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 2.5rem;
  justify-content: space-around;
}

article {
  display: flex;
  width: 10rem;
  justify-content: space-around;
  gap: 0.5rem;
}

article .icon-svg {
  cursor: default;
}

/* PROJECTS SECTION */

#projects {
  position: relative;
}

.color-container {
  border-color: var(--color-border);
  background: var(--color-surface);
}

/* Project cards: retro TV (bezel + screen + stand) */
#projects .project-tv-article {
  justify-content: center;
  width: 100%;
}

.project-tv {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
}

.project-tv__bezel {
  position: relative;
  width: 100%;
  padding: 0.65rem 0.75rem 1.1rem;
  border-radius: 0.65rem;
  background: linear-gradient(
    165deg,
    var(--tv-bezel-top) 0%,
    var(--tv-bezel-mid) 42%,
    var(--tv-bezel-bottom) 100%
  );
  box-shadow:
    0 0.35rem 0.75rem rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -3px 0 rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.45);
}

/* Power LED on the “chin” */
.project-tv__bezel::after {
  content: "";
  position: absolute;
  bottom: 0.4rem;
  right: 0.85rem;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #8ef5b4, #1e7a45);
  box-shadow: 0 0 0.4rem rgba(46, 204, 113, 0.65);
}

.project-tv__screen {
  position: relative;
  border-radius: 0.2rem;
  overflow: hidden;
  background: var(--tv-screen-matte);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.9),
    inset 0 0 0 3px rgba(255, 255, 255, 0.08),
    inset 0 0 1.5rem rgba(0, 0, 0, 0.55);
}

/* Subtle CRT-style scanlines */
.project-tv__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0.22;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.12) 2px,
    rgba(0, 0, 0, 0.12) 3px
  );
}

@media (prefers-reduced-motion: reduce) {
  .project-tv__screen::after {
    opacity: 0.12;
  }
}

.project-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.12rem;
}

.project-tv__stand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.15rem;
}

.project-tv__stand-neck {
  width: 32%;
  height: 0.5rem;
  background: linear-gradient(180deg, var(--tv-stand), var(--tv-bezel-bottom));
  border-radius: 0 0 0.15rem 0.15rem;
  box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.35);
}

.project-tv__stand-foot {
  width: 52%;
  height: 0.42rem;
  margin-top: -1px;
  background: linear-gradient(180deg, var(--tv-stand), var(--tv-stand-foot));
  border-radius: 0 0 0.35rem 0.35rem;
  box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.35);
}

.project-title {
  margin: 1rem;
  color: var(--color-text);
}

.project-btn {
  color: var(--color-text);
  border-color: var(--color-border);
}

/* CONTACT */

#contact {
  display: flex;
  justify-content: center;
  flex-direction: column;
  height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  border-radius: 2rem;
  border: var(--color-border-strong) 0.1rem solid;
  border-color: var(--color-border);
  background: var(--color-surface);
  margin: 2rem auto;
  padding: 0.5rem;
}

.contact-info-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem;
}

.contact-info-container p {
  font-size: larger;
}

.contact-icon {
  cursor: default;
}

.email-icon.icon-svg {
  width: 2.5rem;
  height: 2.5rem;
}

/* FOOTER SECTION */

footer {
  height: 26vh;
  margin: 0 1rem;
}

footer p {
  text-align: center;
}
