/* ================================================
   Y. CHATHURA UMAYANGA SRIYARATHNA - PORTFOLIO
   Editorial Design System
   ================================================ */

/* CSS Variables */
:root {
    --black: #000000;
    --white: #ffffff;

    /* Red Accent Colors */
    --red: #ff0000;
    --red-dark: #cc0000;
    --red-light: #ff3333;
    --red-glow: rgba(255, 0, 0, 0.2);

    --font-display: 'Instrument Serif', Georgia, serif;
    --font-heading: 'Syne', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --font-body: 'Syne', sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

    --container: 1400px;
    --gap: clamp(1rem, 3vw, 2rem);
}

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

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--black);
    line-height: 1.7;
    font-weight: 400;
    overflow-x: hidden;
    cursor: none;
}

body.menu-open {
    overflow: hidden;
}

::selection {
    background: var(--black);
    color: var(--white);
}

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

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

/* Typography */
.mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.1;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    transition: opacity 0.3s var(--ease-out);
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--black);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--red);
    transition: all 0.15s var(--ease-out);
}

.cursor-outline.hover {
    width: 60px;
    height: 60px;
    border-color: var(--red);
    background: var(--red-glow);
}

@media (max-width: 768px) {
    .cursor-dot, .cursor-outline { display: none; }
    body { cursor: auto; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--white);
    border-left: 1px solid var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--red);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-dark);
}

/* ================================================
   NAVIGATION
   ================================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 4rem;
    background: var(--white);
    border-bottom: 2px solid var(--black);
    transition: all 0.3s var(--ease-out);
}

/* Black navigation variant */
.nav.nav-black {
    background: var(--black);
    border-bottom: 2px solid var(--red);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--black);
    transition: color 0.3s var(--ease-out);
}

.nav.nav-black .logo-text {
    color: var(--white);
}

.logo-dot {
    width: 8px;
    height: 8px;
    background: var(--red);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
    font-weight: 700;
    color: var(--black);
    transition: color 0.3s var(--ease-out);
}

/* White text on black nav background */
.nav.nav-black .nav-link {
    color: var(--white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: width 0.4s var(--ease-out);
}

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

/* Active and hover always red regardless of background */
.nav-link:hover,
.nav-link.active {
    color: var(--red);
}

.nav-link-cta {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--red);
    background: var(--red);
    color: var(--white);
    transition: all 0.3s var(--ease-out);
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    background: var(--white);
    color: var(--red);
    border-color: var(--red);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.nav-toggle span {
    width: 30px;
    height: 1px;
    background: var(--black);
    transition: all 0.3s var(--ease-out);
}

/* White hamburger on black nav background */
.nav.nav-black .nav-toggle span {
    background: var(--white);
}

.nav-toggle.active span:first-child {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:last-child {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--white);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--ease-out);
}

/* Black mobile menu variant */
.mobile-menu.mobile-menu-black {
    background: var(--black);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.mobile-link {
    font-family: var(--font-display);
    font-size: 3rem;
    font-style: italic;
    color: var(--black);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s var(--ease-out);
}

/* White text on black mobile menu */
.mobile-menu.mobile-menu-black .mobile-link {
    color: var(--white);
}

.mobile-menu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu.active .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* Hover always red regardless of background */
.mobile-link:hover,
.mobile-link.active {
    color: var(--red);
}

@media (max-width: 968px) {
    .nav { padding: 1.25rem 2rem; }
    .nav-menu { display: none; }
    .nav-toggle { display: flex; }
}

/* ================================================
   BUTTONS
   ================================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--red);
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn-primary svg {
    width: 18px;
    height: 18px;
    transition: transform 0.4s var(--ease-out);
}

.btn-primary:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    box-shadow: 0 0 30px var(--red-glow);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-large {
    padding: 1.5rem 3rem;
    font-size: 0.8rem;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-400);
    transition: color 0.3s var(--ease-out);
    position: relative;
}

.btn-ghost::after {
    content: '';
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gray-600);
    transition: background 0.3s var(--ease-out);
}

.btn-ghost:hover {
    color: var(--red);
}

.btn-ghost:hover::after {
    background: var(--red);
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
    min-height: 100vh;
    padding: 8rem 4rem 4rem;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 6rem;
    align-items: center;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
}

.hero-left {
    position: relative;
    z-index: 2;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 700;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-label .label-line {
    width: 40px;
    height: 1px;
    background: var(--red);
}

.hero-title {
    margin-bottom: 2rem;
    overflow: hidden;
}

.title-line {
    display: block;
    overflow: hidden;
}

.title-word {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(100%);
    animation: revealUp 1s var(--ease-out) forwards;
}

.title-line:nth-child(1) .title-word { animation-delay: 0.3s; }
.title-line:nth-child(2) .title-word { animation-delay: 0.4s; }
.title-line:nth-child(3) .title-word { animation-delay: 0.5s; }

.title-italic {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--red);
}

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--black);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.8;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) 0.7s forwards;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) 0.9s forwards;
}

.hero-right {
    position: relative;
    opacity: 0;
    animation: fadeInUp 1s var(--ease-out) 0.5s forwards;
}

.hero-image-container {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}

.hero-image {
    aspect-ratio: 3/4;
    background: var(--white);
    border: 3px solid var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-initials {
    font-family: var(--font-display);
    font-size: 6rem;
    font-style: italic;
    color: var(--red);
    opacity: 0.3;
}

.hero-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 1;
}

/* Hide initials when photo is present */
.hero-image:has(.hero-photo) .hero-initials {
    display: none;
}

/* Fallback for browsers without :has() support */
.hero-photo + .hero-initials {
    display: none;
}

/* Show initials if image fails to load */
.hero-photo[src=""], 
.hero-photo:not([src]) {
    display: none;
}

.hero-photo[src=""]:not([src]) + .hero-initials,
.hero-photo:not([src]) + .hero-initials {
    display: block;
}

.hero-image-frame {
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 1px solid var(--red);
    pointer-events: none;
}

.hero-image-label {
    position: absolute;
    bottom: -30px;
    right: 0;
    color: var(--black);
    font-weight: 700;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--black);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-style: italic;
    line-height: 1;
    color: var(--red);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 700;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.hero-name {
    text-align: center;
    margin-top: 2rem;
}

.hero-name-full {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.hero-name-nick {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 700;
}

.hero-name-nick span {
    color: var(--red);
    font-weight: 700;
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--black);
    font-weight: 700;
    opacity: 0;
    animation: fadeInUp 0.8s var(--ease-out) 1.2s forwards;
}

.scroll-line {
    width: 60px;
    height: 2px;
    background: var(--black);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--red);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.hero-decoration {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    opacity: 0.03;
    pointer-events: none;
}

.hero-circle {
    width: 600px;
    height: 600px;
    animation: rotate 60s linear infinite;
}

@keyframes rotate {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

@media (max-width: 1024px) {
    .hero { padding: 7rem 2rem 3rem; }
    .hero-grid { 
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    .hero-right { order: -1; }
    .hero-image-container { 
        max-width: 380px;
        margin: 0 auto;
    }
    .hero-stats {
        justify-content: flex-start;
        gap: 3rem;
    }
    .hero-scroll { left: 2rem; bottom: 2rem; }
}

@media (max-width: 768px) {
    .hero-cta { flex-direction: column; align-items: flex-start; }
    .hero-stats { gap: 2rem; }
    .stat-number { font-size: 3rem; }
}

/* ================================================
   SECTION STYLES
   ================================================ */
section {
    padding: 6rem 4rem;
    position: relative;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.section-number {
    color: var(--red);
    font-weight: 700;
    font-size: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 700;
    margin-left: auto;
    transition: color 0.3s var(--ease-out);
}

.section-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s var(--ease-out);
}

.section-link:hover {
    color: var(--red);
}

.section-link:hover svg {
    transform: translateX(4px);
}

@media (max-width: 768px) {
    section { padding: 4rem 1.5rem; }
    .section-header { gap: 1rem; }
    .section-link { margin-left: 0; width: 100%; margin-top: 1rem; }
}

/* ================================================
   FEATURED WORK
   ================================================ */
.featured {
    background: var(--white);
    border-top: 3px solid var(--black);
    border-bottom: 3px solid var(--black);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
}

.featured-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 3px solid var(--black);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

.featured-card:hover {
    border-color: var(--red);
    transform: translateY(-8px);
    box-shadow: 8px 8px 0 var(--red);
}

.featured-large {
    grid-row: span 2;
}

.featured-image {
    aspect-ratio: 16/10;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-bottom: 3px solid var(--black);
}

.featured-large .featured-image {
    aspect-ratio: auto;
    flex: 1;
    min-height: 300px;
}

.featured-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--red);
    opacity: 0.5;
    transition: all 0.3s var(--ease-out);
}

.featured-large .featured-placeholder {
    font-size: 5rem;
}

.placeholder-outline {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    -webkit-text-stroke: 2px var(--red);
    color: transparent;
}

.featured-card:hover .featured-placeholder {
    transform: scale(1.1);
    opacity: 1;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.featured-card:hover .featured-img {
    transform: scale(1.05);
}

.featured-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.featured-large .featured-content {
    padding: 2.5rem;
}

.featured-category {
    color: var(--black);
    font-size: 0.8rem;
    font-weight: 700;
}

.featured-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.featured-large .featured-title {
    font-size: 2rem;
}

.featured-desc {
    color: var(--black);
    font-size: 1rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 700;
    margin-top: auto;
    padding-top: 1rem;
    transition: all 0.3s var(--ease-out);
}

.featured-link svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s var(--ease-out);
}

.featured-card:hover .featured-link {
    color: var(--red);
}

.featured-card:hover .featured-link svg {
    transform: translate(4px, -4px);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: 1fr 1fr;
    }
    .featured-large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    .featured-large {
        grid-column: span 1;
    }
}

/* ================================================
   SERVICES PREVIEW
   ================================================ */
.services-preview {
    background: var(--white);
    border-top: 3px solid var(--black);
    border-bottom: 3px solid var(--black);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    background: var(--black);
}

.service-item {
    padding: 3rem;
    background: var(--white);
    transition: all 0.3s var(--ease-out);
}

.service-item:hover {
    background: var(--red);
    color: var(--white);
}

.service-number {
    display: block;
    color: var(--red);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.service-item:hover .service-number {
    color: var(--white);
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--black);
    font-size: 1rem;
    line-height: 1.7;
}

.service-item:hover .service-desc {
    color: var(--white);
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ================================================
   CTA SECTION
   ================================================ */
.cta-section {
    background: var(--black);
    color: var(--white);
    text-align: center;
    padding: 8rem 4rem;
    position: relative;
    overflow: hidden;
    border-top: 8px solid var(--red);
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.cta-title span {
    display: block;
}

.cta-italic {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--red);
}

.cta-text {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.cta-decoration {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.cta-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--red);
    opacity: 0.3;
}

.cta-circle:nth-child(1) {
    width: 400px;
    height: 400px;
}

.cta-circle:nth-child(2) {
    width: 600px;
    height: 600px;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    background: var(--black);
    color: var(--white);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    padding: 5rem 4rem;
    border-bottom: 3px solid var(--red);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    display: block;
    margin-bottom: 1rem;
    color: var(--red);
}

.footer-tagline {
    color: var(--white);
    font-size: 1.1rem;
    line-height: 1.7;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col-title {
    color: var(--red);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-col a {
    color: var(--white);
    font-size: 1rem;
    transition: color 0.3s var(--ease-out);
}

.footer-col a:hover {
    color: var(--red);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
}

.footer-copy {
    color: var(--white);
    font-size: 1rem;
}

.footer-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--red);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem 2rem;
    }
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem 2rem;
    }
}

/* ================================================
   PAGE HEADER (for inner pages)
   ================================================ */
.page-header {
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    padding: 8rem 4rem 4rem;
    position: relative;
    overflow: hidden;
}

.page-header-content {
    max-width: var(--container);
    width: 100%;
    margin: 0 auto;
}

.page-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 700;
}

.page-label .label-line {
    width: 40px;
    height: 1px;
    background: var(--red);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.page-title-italic {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    color: var(--red);
}

.page-subtitle {
    font-size: 1.4rem;
    color: var(--black);
    max-width: 600px;
    line-height: 1.8;
}

.page-header-decoration {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: 25vw;
    font-style: italic;
    color: var(--red);
    opacity: 0.1;
    pointer-events: none;
    line-height: 1;
}

@media (max-width: 768px) {
    .page-header {
        min-height: 50vh;
        padding: 6rem 1.5rem 3rem;
    }
    .page-header-decoration {
        display: none;
    }
}

/* ================================================
   CONTENT SECTIONS
   ================================================ */
.content-section {
    padding: 6rem 4rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    max-width: var(--container);
    margin: 0 auto;
}

.content-sidebar {
    position: sticky;
    top: 6rem;
    height: fit-content;
}

.sidebar-title {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.content-main {
    max-width: 800px;
}

.content-main p {
    color: var(--black);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.content-main p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .content-section {
        padding: 4rem 2rem;
    }
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .content-sidebar {
        position: static;
    }
}

/* ================================================
   TIMELINE
   ================================================ */
.timeline-section {
    padding: 6rem 4rem;
}

.timeline-container {
    max-width: var(--container);
    margin: 0 auto;
}

.timeline {
    position: relative;
    padding-left: 3rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--red);
}

.timeline-item {
    position: relative;
    padding-bottom: 4rem;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3.4rem;
    top: 0.5rem;
    width: 15px;
    height: 15px;
    background: var(--white);
    border: 3px solid var(--black);
    border-radius: 50%;
    transition: all 0.3s var(--ease-out);
}

.timeline-item:hover::before {
    background: var(--red);
    border-color: var(--red);
    transform: scale(1.3);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-role {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-company {
    font-size: 1.1rem;
    color: var(--black);
    margin-bottom: 1rem;
}

.timeline-desc {
    color: var(--black);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 600px;
}

.timeline-desc ul {
    list-style: none;
    margin-top: 1rem;
}

.timeline-desc li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.timeline-desc li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--red);
    font-weight: 700;
}

@media (max-width: 768px) {
    .timeline-section {
        padding: 4rem 1.5rem;
    }
    .timeline {
        padding-left: 2rem;
    }
    .timeline-item::before {
        left: -2rem;
    }
}

/* ================================================
   SKILLS GRID
   ================================================ */
.skills-section {
    padding: 6rem 4rem;
    background: var(--white);
    border-top: 3px solid var(--black);
    border-bottom: 3px solid var(--black);
}

.skills-container {
    max-width: var(--container);
    margin: 0 auto;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.skill-card {
    padding: 3rem;
    background: var(--white);
    border: 3px solid var(--black);
    transition: all 0.3s var(--ease-out);
}

.skill-card:hover {
    border-color: var(--red);
    transform: translateY(-8px);
    box-shadow: 8px 8px 0 var(--red);
}

.skill-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    color: var(--black);
}

.skill-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.skill-desc {
    color: var(--black);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .skills-section {
        padding: 4rem 1.5rem;
    }
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   PROJECTS GRID
   ================================================ */
.projects-section {
    padding: 6rem 4rem;
}

.projects-container {
    max-width: var(--container);
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--white);
    border: 3px solid var(--black);
    overflow: hidden;
    transition: all 0.3s var(--ease-out);
}

.project-card:hover {
    border-color: var(--red);
    transform: translateY(-8px);
    box-shadow: 8px 8px 0 var(--red);
}

.project-card.featured {
    grid-column: span 2;
}

.project-card.featured .project-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-image {
    aspect-ratio: 16/10;
    background: var(--white);
    border-bottom: 3px solid var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-card.featured .project-image {
    aspect-ratio: auto;
    min-height: 400px;
}

.project-placeholder {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--red);
    opacity: 0.5;
    transition: all 0.3s var(--ease-out);
}

.project-card.featured .project-placeholder {
    font-size: 5rem;
}

.project-card:hover .project-placeholder {
    transform: scale(1.1);
    opacity: 1;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--red);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.project-content {
    padding: 2rem;
}

.project-card.featured .project-content {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-type {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.project-card.featured .project-title {
    font-size: 2.5rem;
}

.project-desc {
    color: var(--black);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    padding: 0.5rem 1rem;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    transition: gap 0.3s var(--ease-out);
}

.project-link svg {
    width: 16px;
    height: 16px;
}

.project-link:hover {
    gap: 1rem;
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .project-card.featured {
        grid-column: span 1;
    }
    .project-card.featured .project-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .projects-section {
        padding: 4rem 1.5rem;
    }
}

/* ================================================
   EDUCATION GRID
   ================================================ */
.education-section {
    padding: 6rem 4rem;
    background: var(--white);
    border-top: 3px solid var(--black);
    border-bottom: 3px solid var(--black);
}

.education-container {
    max-width: var(--container);
    margin: 0 auto;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.education-card {
    padding: 3rem;
    background: var(--white);
    border: 3px solid var(--black);
    transition: all 0.3s var(--ease-out);
}

.education-card:hover {
    border-color: var(--red);
    transform: translateY(-8px);
    box-shadow: 8px 8px 0 var(--red);
}

.education-year {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 700;
    margin-bottom: 1rem;
}

.education-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.education-school {
    color: var(--black);
    font-size: 1.05rem;
    line-height: 1.7;
}

.education-badge {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: var(--black);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    font-weight: 700;
}

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

@media (max-width: 768px) {
    .education-section {
        padding: 4rem 1.5rem;
    }
}

/* ================================================
   CONTACT PAGE
   ================================================ */
.contact-section {
    padding: 6rem 4rem;
}

.contact-container {
    max-width: var(--container);
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.contact-info h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.contact-info p {
    color: var(--black);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--white);
    border: 3px solid var(--black);
    transition: all 0.3s var(--ease-out);
}

.contact-link-item:hover {
    border-color: var(--red);
    transform: translateX(8px);
    box-shadow: 8px 8px 0 var(--red);
}

.contact-link-item:hover svg {
    color: var(--red);
}

.contact-link-item svg {
    width: 28px;
    height: 28px;
    color: var(--black);
}

.contact-link-item span {
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-form-wrapper {
    background: var(--white);
    padding: 3rem;
    border: 3px solid var(--black);
}

.contact-form-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--black);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--black);
    color: var(--black);
    font-family: var(--font-body);
    font-size: 1.05rem;
    transition: border-color 0.3s var(--ease-out);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 4rem 1.5rem;
    }
    .contact-form-wrapper {
        padding: 2rem;
    }
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
