/* ==========================================================================
   CSS VARIABLES (ROOT)
   ========================================================================== */

:root {
  /* Core brand colors */
  --cyan:     #36bfea;
  --magenta:  #e44699;
  --yellow:   #efdf4f;
  --black:    #3a3a3a;

  /* Legacy aliases */
  --blue: var(--cyan);
  --dark: var(--black);

  /* Gradients */
  --gradient-hero:    linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7));
  --gradient-overlay: linear-gradient(transparent, rgba(0,0,0,0.9));

  /* Backgrounds */
  --bg-primary:   var(--black);
  --bg-secondary: var(--yellow);

  /* Skill levels */
  --expert:       var(--cyan);
  --expert-dark:  color-mix(in oklch, var(--expert) 75%, black);
  --advanced:     var(--yellow);
  --advanced-dark: color-mix(in oklch, var(--advanced) 75%, black);
  --familiar:     var(--magenta);
  --familiar-dark: color-mix(in oklch, var(--familiar) 75%, black);

  /* Text & neutrals */
  --text-light:     #e0e0e0;
  --text-muted:     #888;
  --white-alpha-12: rgba(255, 255, 255, 0.12);

  /* Shadows */
  --shadow-black:     0 8px 24px oklch(0% 0 0 / 0.25);
  --shadow-soft:      0 4px 12px oklch(0% 0 0 / 0.15);
  --shadow-strong:    0 12px 32px oklch(0% 0 0 / 0.35);
  --shadow-hover:     0 12px 32px oklch(0% 0 0 / 0.30);
  --shadow-cyan:      0 8px 24px color-mix(in oklch, var(--cyan) 40%, black);
  --shadow-cyan-light:0 4px 16px color-mix(in oklch, var(--cyan) 25%, black);
}

/* ==========================================================================
   GLOBAL RESET & BASE STYLES
   ========================================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Grain overlay (homepage only) */
body > .grain-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.4'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 450px 450px;
  opacity: 0.28;
  mix-blend-mode: luminosity;
  pointer-events: none;
  z-index: 1;
}

/* Minimal scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.45);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--yellow));
  z-index: 9999;
  pointer-events: none;
  transition: width 0.1s linear;
}

/* ==========================================================================
   TYPOGRAPHY & GENERAL UTILITY
   ========================================================================== */

.section-title {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  margin-bottom: 80px;
  color: white;
}

.btn {
  display: block;
  width: fit-content;
  margin: 0 auto 16px;
  padding: 14px 40px;
  background: var(--blue);
  color: white;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  box-shadow: 0 10px 30px var(--shadow-cyan);
  transition: all 300ms;
}

.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px var(--black);
  background: white;
  color: var(--cyan);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 24px 5%;
  background: white;
  z-index: 1000;
  box-shadow: var(--shadow-black);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1600px;
  margin: 0 auto;
}

.logo-svg {
  height: 80px;
  transition: opacity 300ms;
}

.nav-links {
  display: flex;
  gap: 48px;
  align-items: center;
  list-style: none;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  color: var(--black);
  font-weight: 500;
  font-size: 18px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transition: width 300ms;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--dark);
  margin: 4px 0;
  border-radius: 2px;
  transition: all 300ms;
}

/* ==========================================================================
   HERO - Homepage only (full screen)
   ========================================================================== */

.hero {
  height: 100vh;
  background: var(--gradient-hero), url('/assets/edyt_hero.svg') center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 72px;
  margin-bottom: 8px;
}

.contact-info {
  margin: 24px 0;
  font-size: 18px;
}

.contact-info a {
  color: white;
  text-decoration: none;
}

/* ==========================================================================
   INNER HERO - All other pages (smaller, elegant version)
   ========================================================================== */

.inner-hero {
  height: 60vh;
  min-height: 400px;
}

/* ==========================================================================
   SECTIONS (GENERAL)
   ========================================================================== */

section {
  padding: 120px 5%;
}

/* ==========================================================================
   TIMELINE
   ========================================================================== */

.timeline {
  max-width: 1100px;
  margin: 0 auto;
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 900ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.year {
  width: 120px;
  text-align: right;
  padding-right: 32px;
  font-family: 'Playfair Display', serif;
  font-size: 42px;
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1.5px white;
  opacity: 0.4;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  transition: color 500ms, opacity 500ms, -webkit-text-stroke 500ms;
}

.timeline-item:hover .year {
  color: var(--yellow);
  -webkit-text-stroke: 0;
  opacity: 1;
}

.content {
  flex: 1;
  background: var(--cyan);
  padding: 48px;
  border-radius: 24px;
  box-shadow: var(--shadow-black);
  border: 0.5px solid white;
  transition: box-shadow 900ms;
}

.content:hover {
  box-shadow: 0 0 18px var(--yellow);
}

.content h3 {
  color: white;
  font-size: 26px;
  margin-bottom: 16px;
}

.content ul {
  padding-left: 24px;
  color: white;
  line-height: 1.8;
}

/* ==========================================================================
   SKILLS + EDUCATION
   ========================================================================== */

.skills-education-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 5%;
}

.education-card {
  background: var(--magenta);
  color: white;
  padding: 56px 48px;
  border-radius: 24px;
  text-align: center;
  margin-bottom: 64px;
}

.education-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  margin-bottom: 20px;
}

.grid-skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.program-bars,
.design-skills-card {
  background: white;
  padding: 48px 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px var(--shadow-black);
  transition: all 400ms;
}

.program-bars h3,
.design-skills-card h3 {
  color: var(--cyan);
  text-align: center;
  margin-bottom: 48px;
  font-family: 'Playfair Display', serif;
  font-size: 30px;
}

/* Skill bars */
.bars {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.bar-item {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--black);
  font-weight: 500;
}

.bar-item .label {
  min-width: 130px;
  font-size: 17px;
}

.bar-item.expert    .label { color: var(--expert); }
.bar-item.advanced  .label { color: var(--advanced); }
.bar-item.familiar  .label { color: var(--familiar); }

.bar-item .bar {
  flex: 1;
  height: 20px;
  background: var(--white-alpha-12);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 4px 8px rgba(0,0,0,0.2);
}

.bar-item .fill {
  height: 100%;
  width: 0;
  border-radius: 12px;
  transition: width 1.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.bar-item.expert    .fill { background: var(--cyan); }
.bar-item.advanced  .fill { background: var(--yellow); }
.bar-item.familiar  .fill { background: var(--magenta); }

.bar-item .percent {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 14px;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

.bar-item.in-view .fill {
  width: var(--percent);
}

/* Skill list dots */
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 18px;
  font-weight: 500;
}

.skill span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 16px currentColor;
}

.skill.expert    { color: var(--expert); }
.skill.expert    span { background: var(--expert); }
.skill.advanced  { color: var(--advanced); }
.skill.advanced  span { background: var(--advanced); }
.skill.familiar  { color: var(--familiar); }
.skill.familiar  span { background: var(--familiar); }

/* ==========================================================================
   PORTFOLIO
   ========================================================================== */

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto 64px;
  padding: 0 5%;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.portfolio-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px var(--shadow-black);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  transition: transform 400ms ease, box-shadow 400ms ease;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.4s ease;
}

.portfolio-item .hover-img {
  opacity: 0;
  z-index: 1;
}

.portfolio-item .main-img {
  opacity: 1;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-overlay);
  color: white;
  padding: 25px;
  transform: translateY(100%);
  transition: transform 400ms ease;
  z-index: 2;
}

.view-project {
  margin-top: 12px;
  font-size: 16px;
  opacity: 0;
  transition: opacity 400ms ease;
  color: var(--text-light);
}

/* ==========================================================================
   PROJECT DETAIL
   ========================================================================== */

.project-detail {
  background: var(--bg-primary);
  color: var(--text-light);
  min-height: 100vh;
}

.project-hero img {
  width: 100%;
  height: 70vh;
  object-fit: cover;
}

.project-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 5% 140px;
}

.project-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 64px;
  color: var(--blue);
  margin-bottom: 16px;
  line-height: 1.1;
}

.project-meta {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 60px;
}

.project-description h2 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--blue);
  margin: 60px 0 24px;
}

.project-description p,
.project-description ul {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 32px;
  color: var(--text-light);
}

.project-description ul {
  padding-left: 28px;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin: 80px 0;
}

.project-gallery img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 10px 40px var(--shadow-black);
  transition: transform 400ms;
}

/* ==========================================================================
   CONTACT & FOOTER
   ========================================================================== */

.contact {
  background: var(--magenta);
  color: white;
  text-align: center;
  padding: 120px 5%;
}

.contact h2 {
  font-size: 48px;
  font-family: 'Playfair Display', serif;
  margin-bottom: 32px;
}

footer {
  padding: 40px 20px;
  background: var(--yellow);
  color: var(--black);
  text-align: center;
  font-size: 15px;
  margin-top: auto;
}

/* Contact page form styling */
.contact-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 5%;
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
}

.contact-page .contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  width: 100%;
}

.contact-page .contact-info,
.contact-page .contact-form-wrapper {
  flex: 1 1 400px;
  background: var(--cyan);
  padding: 48px;
  border-radius: 24px;
  box-shadow: var(--shadow-black);
  color: white;
}

.contact-page .contact-form input,
.contact-page .contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 24px;
  border: none;
  border-radius: 12px;
  background: white;
  color: black;
  font-size: 16px;
}

.contact-page .contact-form input:focus,
.contact-page .contact-form textarea:focus {
  outline: 2px solid var(--magenta);
  outline-offset: 2px;
}

.contact-page .contact-form-wrapper .btn {
  background: transparent;
  border: 2px solid var(--magenta);
  color: white;
  padding: 11px 29px;
  border-radius: 50px;
  font-weight: 300;
  transition: all 0.3s ease;
}

.contact-page .contact-form-wrapper .btn:hover {
  background: var(--magenta);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px var(--black);
}

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */

@media (max-width: 992px) {
  .grid-skills {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 868px) {
  .hero h1 {
    font-size: 48px;
  }

  .inner-hero {
    height: 50vh;
    min-height: 340px;
  }

  .inner-hero h1 {
    font-size: clamp(2.2rem, 7vw, 3rem);
  }

  .year {
    writing-mode: horizontal-tb;
    transform: none;
    padding-right: 0;
    text-align: center;
    color: var(--yellow);
    -webkit-text-stroke: 0;
    opacity: 1;
    font-size: 3.4rem;
    line-height: 1;
    margin-bottom: 24px;
    width: 100%;
    white-space: nowrap;
  }

  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    position: fixed;
    top: 120px;
    left: -100%;
    background: white;
    flex-direction: column;
    width: 100%;
    height: calc(100vh - 80px);
    padding: 48px 5%;
    transition: left 400ms;
    gap: 48px;
    font-size: 24px;
    align-items: flex-start;
  }

  .nav-links.active {
    left: 0;
  }

  .mobile-menu {
    display: flex;
  }

  .education-card {
    padding: 40px 24px;
  }
}

/* Hamburger animation */
.mobile-menu.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu.active .bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Hover effects only on hover-capable devices */
@media (hover: hover) and (pointer: fine) {
  .logo:hover .logo-svg { opacity: 0.8; }
  .btn:hover { transform: translateY(-4px); box-shadow: 0 14px 40px var(--black); background: white; color: var(--cyan); }
  .timeline-item:hover .year { color: var(--yellow); -webkit-text-stroke: 0; opacity: 1; }
  .content:hover { box-shadow: 0 0 18px var(--yellow); }
  .portfolio-item:hover { transform: translateY(-12px); box-shadow: 0 20px 50px var(--yellow); }
  .portfolio-item:hover .hover-img { opacity: 1; }
  .portfolio-item:hover .main-img { opacity: 0; }
  .portfolio-item:hover .portfolio-overlay { transform: translateY(0); }
  .portfolio-item:hover .view-project { opacity: 1; }
  .project-gallery img:hover { transform: translateY(-8px); }
}

/* Prevent tap highlight on touch devices */
button, a, input, select, textarea, *[role="button"] {
  -webkit-tap-highlight-color: transparent;
}