/* =========================================================

   MODERN TECH PORTFOLIO   Light + Dark Theme   Typography: Space Grotesk + Inter

   ========================================================= */

/* =========================================================

   COLOR SYSTEM

   ========================================================= */

:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --text: #172033;
  --muted-text: #5b6575;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --footer-bg: #e8ecf2;
  --footer-text: #4b5563;
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 220ms ease;
}

/* =========================================================

   LINKS

   ========================================================= */

a,
a:visited {
  text-decoration: none;
  color: #000000;
}

.dark a,
.dark a:visited {
  color: #ffffff;
}

/* =========================================================

   DARK THEME

   ========================================================= */

.dark {
  --bg: #0b1120;
  --card: #151e2e;
  --card-hover: #1a2638;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: rgba(96, 165, 250, 0.1);
  --text: #f8fafc;
  --muted-text: #b8c2d1;
  --border: #263449;
  --border-strong: #34445c;
  --footer-bg: #111827;
  --footer-text: #b8c2d1;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 12px 35px rgba(0, 0, 0, 0.28);
}

/* =========================================================

   GLOBAL RESET

   ========================================================= */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: clamp(14px, 1.2vw, 18px);
}

body {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition:
    background-color var(--transition),
    color var(--transition);
}

/* =========================================

   STICKY FOOTER   Keeps the footer at the bottom of   short pages, including mobile.

   ========================================= */

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* =========================================================

   TYPOGRAPHY

   ========================================================= */

h1,
h2,
h3,
h4,
.brand {
  font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
  color: var(--text);
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  font-weight: 700;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  font-weight: 700;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.2;
  font-weight: 600;
}

p {
  margin-top: 0;
}

/* =========================================================

   CONTAINER

   ========================================================= */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================

   THEME TRANSITIONS

   ========================================================= */

html,
body,
.site-header,
.site-footer,
.work-card,
.nav-links,
.tech-item,
.project-photo-placeholder {
  transition:
    background-color var(--transition),
    color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

/* =========================================================

   HEADER

   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.dark .site-header {
  background: rgba(11, 17, 32, 0.88);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 12px 0;
}

/* =========================================================

   BRAND

   ========================================================= */

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: color var(--transition);
}

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

/* =========================================================

   NAVIGATION

   ========================================================= */

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links a {
  position: relative;
  color: var(--text);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  transition:
    color var(--transition),
    background-color var(--transition),
    transform var(--transition);
}

.nav-links a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* =========================================================

   LINKEDIN

   ========================================================= */

.linkedin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  border-radius: 7px !important;
  background: #0a66c2;
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.9rem;
  transition:
    transform var(--transition),
    background-color var(--transition);
}

.linkedin-link:hover {
  background: #004182 !important;
  color: #ffffff !important;
  transform: translateY(-3px) scale(1.05);
}

/* =========================================================

   THEME TOGGLE

   ========================================================= */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  transition:
    transform 300ms ease,
    background-color var(--transition),
    color var(--transition);
}

.theme-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: rotate(18deg) scale(1.08);
}

/* =========================================================

   ACCESSIBILITY

   ========================================================= */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================

   SECTIONS

   ========================================================= */

.section {
  padding: 80px 0;
}

/* =========================================================

   WORK / PROJECTS

   ========================================================= */

.works h2,
.contact h2 {
  margin-top: 0;
}

.section.works h2 {
  margin-bottom: 8px;
}

/* =========================================

   SELECTED WORKS GRID

   ========================================= */

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 32px;
  margin-top: 28px;
  align-items: start;
}

/* =========================================================

   WORK SECTION TITLE ANIMATION

   ========================================================= */

.works h2 {
  position: relative;
  display: inline-block;
}

.works h2::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  background: var(--accent);
  border-radius: 999px;
  transition: width 350ms ease;
}

.works h2:hover::after {
  width: 85px;
}

/* =========================================================

   PROJECT CARD

   ========================================================= */

.work-card {
  display: flex;
  flex-direction: column;
  height: auto;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: cardAppear 0.65s ease forwards;
  transition:
    transform 300ms ease,
    box-shadow 300ms ease,
    border-color 300ms ease,
    background-color 300ms ease;
}

.work-card:nth-child(1) {
  animation-delay: 0.15s;
}

.work-card:nth-child(2) {
  animation-delay: 0.28s;
}

.work-card:nth-child(3) {
  animation-delay: 0.41s;
}

.work-card:hover {
  transform: translateY(-8px);
  background: var(--card-hover);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

/* =========================================================

   PROJECT THUMBNAIL   Clean lift + glow effect

   ========================================================= */

.work-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #e8f0ff, #f8fafc);
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 350ms ease,
    box-shadow 350ms ease;
}

.dark .work-thumb {
  background: linear-gradient(135deg, #17263c, #101827);
}

/* Soft glow behind image */

.work-thumb::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  opacity: 0;
  filter: blur(18px);
  transform: scale(0.92);
  transition:
    opacity 400ms ease,
    transform 400ms ease;
}

/* Image */

.work-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  border-radius: var(--radius-sm);
  transition:
    transform 400ms ease,
    box-shadow 400ms ease;
}

/* Thumbnail hover */

.work-card:hover .work-thumb {
  transform: translateY(-3px);
}

.work-card:hover .work-thumb::before {
  opacity: 0.35;
  transform: scale(1);
}

.work-card:hover .work-thumb img {
  transform: scale(1.045);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.18);
}

/* =========================================================

   PROJECT CARD TEXT

   ========================================================= */

.work-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.work-card p {
  flex: none;
  margin-bottom: 16px;
  color: var(--muted-text);
  line-height: 1.7;
}

/* =========================================================

   BUTTONS

   ========================================================= */

.work-card .btn {
  margin-top: 0;
  align-self: flex-start;
}

.btn,
a.btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 16px;
  background: var(--accent);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18);
  transition:
    background-color 200ms ease,
    transform 200ms ease,
    box-shadow 200ms ease;
}

.btn:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* =========================================================

   CONTACT

   ========================================================= */

.contact .container {
  text-align: center;
}

/* =========================================================

   TECHNOLOGIES

   ========================================================= */

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.tech-item {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
}

.dark .tech-item {
  border-color: rgba(96, 165, 250, 0.16);
}

/* =========================================================

   FOOTER

   ========================================================= */

.site-footer {
  padding: 24px 0;
  text-align: center;
  background: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

/* =========================================================

   HAMBURGER MENU

   ========================================================= */

.menu-icon {
  display: inline-block;
  position: relative;
  width: 22px;
  height: 18px;
}

.menu-icon span {
  position: absolute;
  left: 0;
  right: 0;
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform var(--transition),
    opacity 180ms ease,
    top var(--transition);
}

.menu-icon span:nth-child(1) {
  top: 0;
}

.menu-icon span:nth-child(2) {
  top: 8px;
}

.menu-icon span:nth-child(3) {
  top: 16px;
}

.nav-toggle.open .menu-icon span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

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

.nav-toggle.open .menu-icon span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =========================================================

   TABLET

   ========================================================= */

@media (min-width: 700px) and (max-width: 999px) {
  #nav-links {
    display: flex;
    flex-direction: row;
  }
  .nav-toggle {
    display: none;
  }
  .nav-links {
    order: 2;
    margin-left: auto;
    align-items: center;
  }
  .theme-toggle {
    order: 3;
    margin-left: 12px;
  }
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================

   DESKTOP

   ========================================================= */

@media (min-width: 1000px) {
  #nav-links {
    display: flex;
    flex-direction: row;
  }
  .nav-toggle {
    display: none;
  }
  .nav-links {
    order: 2;
    margin-left: auto;
    align-items: center;
  }
  .theme-toggle {
    order: 3;
    margin-left: 12px;
  }
  .works-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================================================

   MOBILE

   ========================================================= */

@media (max-width: 699px) {
  .container {
    padding: 0 18px;
  }
  .section {
    padding: 64px 0;
  }
  .site-header {
    padding: 8px 0;
  }
  .header-inner {
    min-height: 64px;
    padding: 0 8px;
  }
  .nav-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 60;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    font-size: 1.5rem;
  }
  .theme-toggle {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
  }
  #nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    z-index: 50;
    transition:
      max-height var(--transition),
      opacity var(--transition),
      transform var(--transition);
  }
  #nav-links.open {
    max-height: 420px;
    padding: 12px 0;
    opacity: 1;
    transform: translateY(0);
  }
  .nav-links a {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
  }
  .nav-links a.linkedin-link {
    display: inline-flex;
    width: 30px;
    align-self: center;
    padding: 0 !important;
  }
  .works-grid {
    grid-template-columns: 1fr;
  }
  .contact .container {
    padding: 0 18px;
    text-align: center;
  }
  .site-header.nav-open .brand {
    display: none;
  }
  .project-detail {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  h1 {
    font-size: clamp(2.35rem, 12vw, 3.2rem);
  }
}

/* =========================================================

   DARK MODE REFINEMENTS

   ========================================================= */

/* =========================================================

   HOMEPAGE ANIMATION KEYFRAMES

   ========================================================= */

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================

   REDUCED MOTION

   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .work-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* =========================================

   ABOUT PAGE ANIMATIONS

   ========================================= */

/* Main About section */

.about-page {
  overflow: hidden;
}

/* Profile photo enters from the left */

.about-photo {
  opacity: 0;
  transform: translateX(-45px);
  animation: aboutPhotoEnter 800ms ease forwards;
  animation-delay: 150ms;
}

/* Give the image a little interaction */

.about-photo img {
  display: block;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  transition:
    transform 350ms ease,
    box-shadow 350ms ease;
}

.about-photo:hover img {
  transform: scale(1.025);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.15);
}

/* Text enters from the right */

.about-content {
  opacity: 0;
  transform: translateX(45px);
  animation: aboutTextEnter 800ms ease forwards;
  animation-delay: 250ms;
}

/* Main heading */

.about-content h1 {
  position: relative;
  width: fit-content;
}

.about-content h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 10px;
  animation: aboutHeadingLine 600ms ease forwards;
  animation-delay: 850ms;
}

/* Section headings */

.about-content h3,
.about-content h4 {
  transition:
    transform 250ms ease,
    color 250ms ease;
}

.about-content h3:hover,
.about-content h4:hover {
  transform: translateX(5px);
  color: var(--accent);
}

/* Technology items */

.about-content .tech-item {
  opacity: 0;
  transform: translateY(12px);
  animation: techItemEnter 450ms ease forwards;
}

/* Stagger the technology items */

.about-content .tech-item:nth-child(1) {
  animation-delay: 650ms;
}

.about-content .tech-item:nth-child(2) {
  animation-delay: 725ms;
}

.about-content .tech-item:nth-child(3) {
  animation-delay: 800ms;
}

.about-content .tech-item:nth-child(4) {
  animation-delay: 875ms;
}

.about-content .tech-item:nth-child(5) {
  animation-delay: 950ms;
}

.about-content .tech-item:nth-child(6) {
  animation-delay: 1025ms;
}

.about-content .tech-item:nth-child(7) {
  animation-delay: 1100ms;
}

/* Technology item hover */

.about-content .tech-item {
  transition:
    transform 220ms ease,
    color 220ms ease;
}

.about-content .tech-item:hover {
  transform: translateX(7px);
  color: var(--accent);
}

/* =========================================

   ABOUT PAGE KEYFRAMES

   ========================================= */

@keyframes aboutPhotoEnter {
  from {
    opacity: 0;
    transform: translateX(-45px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes aboutTextEnter {
  from {
    opacity: 0;
    transform: translateX(45px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes aboutHeadingLine {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes techItemEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================

   REDUCED MOTION

   ========================================= */

@media (prefers-reduced-motion: reduce) {
  .about-photo,
  .about-content,
  .about-content .tech-item {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .about-content h1::after {
    width: 100%;
    animation: none;
  }
  .about-photo img,
  .about-content h3,
  .about-content h4,
  .about-content .tech-item {
    transition: none;
  }
}

/* =========================================

   PROJECT PAGE

   ========================================= */

.project-page {
  overflow: hidden;
}

/* =========================================

   PROJECT HEADING

   ========================================= */

.project-heading {
  opacity: 0;
  transform: translateY(25px);
  animation: projectHeadingEnter 700ms ease forwards;
  animation-delay: 100ms;
}

.project-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-heading h1 {
  margin-bottom: 12px;
}

.project-subtitle {
  max-width: 700px;
  color: var(--muted-text);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* =========================================

   PROJECT DETAIL

   ========================================= */

.project-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 28px;
  opacity: 0;
  animation: projectDetailEnter 800ms ease forwards;
  animation-delay: 350ms;
}

/* Project visual */

.project-visual {
  overflow: hidden;
  position: relative;
  transition:
    transform 350ms ease,
    box-shadow 350ms ease;
}

/* Subtle hover effect */

.project-visual:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

/* Add a subtle animated shine */

.project-visual::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.16),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 650ms ease;
  pointer-events: none;
}

.project-visual:hover::after {
  left: 140%;
}

/* =========================================

   PROJECT INFORMATION

   ========================================= */

.project-info {
  opacity: 0;
  animation: projectInfoEnter 700ms ease forwards;
  animation-delay: 550ms;
}

/* =========================================

   PROJECT BUTTONS

   ========================================= */

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* Make the live project button stand out */

.project-live-btn {
  position: relative;
}

/* =========================================

   PROJECT KEYFRAMES

   ========================================= */

@keyframes projectHeadingEnter {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes projectDetailEnter {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes projectInfoEnter {
  from {
    opacity: 0;
    transform: translateX(25px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* =========================================

   REDUCED MOTION

   ========================================= */

@media (prefers-reduced-motion: reduce) {
  .project-heading,
  .project-detail,
  .project-info {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .project-visual,
  .project-actions .btn {
    transition: none;
  }
  .project-visual::after {
    display: none;
  }
}

/* =========================================================

   PROJECT PAGE - TWO TOP PANELS + FULL-WIDTH DETAILS

   ========================================================= */

.project-photo-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--card);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
}

.project-visual img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 350ms ease;
}

.project-visual:hover img {
  transform: scale(1.03);
}

.project-info h2,
.project-breakdown h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  line-height: 1.25;
}

.project-blurb {
  margin: 0 0 20px;
  color: var(--muted-text);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.7;
}

.project-info p {
  overflow-wrap: anywhere;
}

.project-breakdown {
  margin-top: 32px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: projectDetailEnter 800ms ease 650ms forwards;
  transition:
    background-color var(--transition),
    border-color var(--transition);
}

.project-breakdown h2 {
  margin-bottom: 24px;
}

.project-breakdown h3 {
  margin: 28px 0 10px;
}

.project-breakdown p {
  max-width: 85ch;
  color: var(--muted-text);
  line-height: 1.8;
}

.project-breakdown p:last-child {
  margin-bottom: 0;
}

/* CONTACT SECTION */

.contact-description {
  max-width: 620px;
  margin: 0 auto 28px;
  color: var(--muted-text);
  line-height: 1.8;
}

/* Project layout on smaller screens */

@media (max-width: 699px) {
  .project-detail {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* =========================================

   DIGITAL PUBLICATION PDF VIEWER

   ========================================= */

.publication-viewer {
  margin: 28px 0 48px;
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.publication-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.publication-tab {
  padding: 10px 18px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color var(--transition),
    color var(--transition),
    border-color var(--transition);
}

.publication-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.publication-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.publication-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

#publication-page-label {
  color: var(--muted-text);
  font-weight: 600;
}

#publication-frame {
  display: block;
  width: 100%;
  height: 700px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.publication-controls {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.publication-controls .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 699px) {
  .publication-viewer {
    padding: 14px;
  }
  #publication-frame {
    height: 65vh;
  }
  .publication-controls .btn {
    flex: 1;
  }
}

/* =========================================

   SELECTED WORKS - SIX PROJECTS

   ========================================= */

/* Animation timing for the second row */

.work-card:nth-child(4) {
  animation-delay: 0.54s;
}

.work-card:nth-child(5) {
  animation-delay: 0.67s;
}

.work-card:nth-child(6) {
  animation-delay: 0.8s;
}

/* Placeholder projects */

.project-coming-soon {
  background: var(--border-strong);
  color: var(--text);
  cursor: default;
  box-shadow: none;
}

.project-coming-soon:hover {
  background: var(--border-strong);
  color: var(--text);
  transform: none;
  box-shadow: none;
}

/* =========================================================

   SELECTED WORKS - RESPONSIVE SPACING

   ========================================================= */

@media (min-width: 700px) and (max-width: 999px) {
  .works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 28px;
  }
}

@media (max-width: 699px) {
  .works-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 28px;
  }
  .work-card {
    padding: 18px;
  }
}

/* ==============================================

   CENTERED PORTFOLIO HERO

   ============================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.hero-inner {
  position: relative;
  min-height: 660px;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

/* Subtle background glow */

.hero-inner::before {
  content: "";
  position: absolute;
  width: min(650px, 90vw);
  height: 550px;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse,
    rgba(37, 99, 235, 0.16),
    transparent 70%
  );
  z-index: -1;
  pointer-events: none;
}

/* Introduction at top right */

.hero-intro {
  position: absolute;
  top: 75px;
  right: 0;
  width: 280px;
  z-index: 3;
}

.hero-label {
  display: block;
  color: #60a5fa;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.hero-intro p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted-text);
}

/* Portrait container */

.hero-visual {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 600px;
  width: min(490px, 65%);
  z-index: 1;
  overflow: hidden;

  /* Soft fade around all edges */
  -webkit-mask-image:
    radial-gradient(
      ellipse 80% 76% at 50% 43%,
      #000 60%,
      rgba(0, 0, 0, 0.92) 74%,
      rgba(0, 0, 0, 0.45) 91%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      #000 0%,
      #000 55%,
      rgba(0, 0, 0, 0.7) 70%,
      rgba(0, 0, 0, 0.25) 85%,
      transparent 100%
    );

  mask-image:
    radial-gradient(
      ellipse 80% 76% at 50% 43%,
      #000 60%,
      rgba(0, 0, 0, 0.92) 74%,
      rgba(0, 0, 0, 0.45) 91%,
      transparent 100%
    ),
    linear-gradient(
      to bottom,
      #000 0%,
      #000 55%,
      rgba(0, 0, 0, 0.7) 70%,
      rgba(0, 0, 0, 0.25) 85%,
      transparent 100%
    );

  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.hero-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Large name overlapping portrait */
.hero-name {
  position: absolute;
  bottom: 25px;
  left: 0;
  z-index: 2;
}

.hero-name h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.6rem, 7vw, 7rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin: 0 0 20px;
  color: var(--text);
}

.hero-period {
  color: #2563eb;
}

.hero-name p {
  color: var(--muted-text);
  font-size: 1rem;
}

/* Bottom detail */

.hero-bottom-label {
  position: absolute;
  bottom: 25px;
  right: 0;
  font-size: 0.75rem;
  color: var(--muted-text);
  letter-spacing: 0.15em;
}

/* ==============================================

   RESPONSIVE HERO

   ============================================== */

@media (max-width: 768px) {
  .hero-inner {
    min-height: 720px;
    display: block;
  }
  .hero-intro {
    top: 35px;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
  }
  .hero-visual {
    width: min(420px, 100%);
    height: 470px;
    bottom: 85px;
  }
  .hero-name {
    bottom: 55px;
    left: 0;
    right: 0;
    text-align: center;
  }
  .hero-name h1 {
    font-size: clamp(3.2rem, 12vw, 5rem);
  }
  .hero-bottom-label {
    bottom: 12px;
    right: 0;
  }
}

/* =========================================
   ABOUT PAGE - NEW LAYOUT
   ========================================= */

/* Photo left, introduction right */
.about-profile {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 60px;
  margin-bottom: 60px;
}

/* Photo styling */
.about-profile .about-photo {
  width: 100%;
}

.about-profile .about-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* Introduction */
.about-profile .about-content {
  max-width: 600px;
}

.about-profile .about-content h1 {
  margin-bottom: 24px;
}

.about-profile .about-content p {
  color: var(--muted-text);
  line-height: 1.8;
  margin-bottom: 20px;
}

/* Full-width information below */
.about-details {
  width: 100%;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.about-details h3 {
  margin-top: 32px;
  margin-bottom: 16px;
}

.about-details h4 {
  margin-top: 28px;
  margin-bottom: 12px;
}

.about-details p {
  color: var(--muted-text);
  max-width: 85ch;
  line-height: 1.8;
}

/* Tablet and mobile */
@media (max-width: 768px) {
  .about-profile {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 40px;
  }

  .about-profile .about-photo {
    max-width: 400px;
    margin: 0 auto;
  }

  .about-profile .about-content {
    max-width: 100%;
  }

  .about-details {
    padding-top: 24px;
  }
}

/* =========================================
   HUSKY UNITED IMAGE CAROUSEL
   ========================================= */

.hu-carousel {
  width: 100%;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* Disable original project image hover effects */

.project-visual.hu-carousel:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.project-visual.hu-carousel::after {
  display: none;
}

.project-visual.hu-carousel:hover img {
  transform: none;
}

/* Image container */

.hu-carousel-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1.95 / 1;
  overflow: hidden;
  background: var(--bg);
}

/* Screenshot styling */

.hu-carousel .hu-carousel-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hu-carousel-image-enter {
  animation: huImageFade 400ms ease;
}

/* Navigation controls */

.hu-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
}

/* Previous and next arrows */

.hu-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  transition:
    background-color var(--transition),
    color var(--transition);
}

.hu-arrow:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

/* Navigation dots */

.hu-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.hu-dot {
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hu-dot::after {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--muted-text);
  border-radius: 50%;
  transition:
    background-color 220ms ease,
    transform 220ms ease;
}

.hu-dot.active::after {
  background: var(--accent);
  transform: scale(1.4);
}

.hu-dot:hover::after {
  background: var(--accent);
}

/* Caption and autoplay controls */

.hu-carousel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 14px;
}

#hu-caption {
  color: var(--muted-text);
  font-size: 0.85rem;
  font-weight: 500;
}

.hu-autoplay {
  padding: 5px 10px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.hu-autoplay:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Keyboard accessibility */

.hu-carousel button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Image transition */

@keyframes huImageFade {
  from {
    opacity: 0.4;
  }

  to {
    opacity: 1;
  }
}

/* Mobile styling */

@media (max-width: 699px) {
  .hu-carousel-controls {
    padding: 10px;
  }

  .hu-arrow {
    width: 36px;
    height: 36px;
  }

  .hu-carousel-footer {
    padding: 0 12px 12px;
  }
}

/* Reduced motion accessibility */

@media (prefers-reduced-motion: reduce) {
  .hu-carousel-image-enter {
    animation: none;
  }

  .hu-carousel button {
    transition: none;
  }
}
/* ================================
   PROJECT 5 — ANIMATED APP PREVIEW
   ================================ */

.project-gif {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 16px;
  background: transparent;
}

.project-gif img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}