@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --background: #1b0728;
    --foreground: #fdf9f9;
    --muted: #8a8a8a;
    --border: rgba(199, 197, 197, 0.12);
    --border-hover: rgba(199, 197, 197, 0.24);
    --hover-bg: rgba(199, 197, 197, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--foreground);

    font-family:
        "Space Grotesk",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    overflow-x: hidden;
}

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

button {
    font: inherit;
}

.site {
    width: min(1300px, calc(100% - 120px));
    margin-inline: auto;
}


/* ─────────────────────────────
   SHARED
───────────────────────────── */

.section-title {
    margin-bottom: 22px;

    font-size: 13px;
    font-weight: 500;

    color: var(--muted);
}

/* Updated Tech Tags styling */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.center-tags {
    justify-content: center;
    margin-bottom: 30px;
}

.tag {
    padding: 5px 12px;
    background: rgba(199, 197, 197, 0.08);
    border: 1px solid rgba(199, 197, 197, 0.15);
    border-radius: 20px;
    
    color: var(--foreground);
    
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    
    transition: 
        background 0.15s ease, 
        border-color 0.15s ease;
}

.project:hover .tag {
    background: rgba(199, 197, 197, 0.12);
    border-color: rgba(199, 197, 197, 0.3);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 44px;

    padding: 11px 18px;

    border: 1px solid rgba(199, 197, 197, 0.55);
    border-radius: 4px;

    color: var(--foreground);

    font-size: 14px;
    font-weight: 600;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.btn:hover {
    background: rgba(199, 197, 197, 0.10);
    border-color: rgba(199, 197, 197, 0.8);

    transform: translateY(-1px);
}

.btn-icon {
    display: inline-flex;

    opacity: 0;

    transform: translateY(-3px);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.links a[href="#work"]:hover .btn-icon {
    opacity: 0.8;
    transform: translateY(0);
}

.links a[href*="drive.google"]:hover .btn-icon {
    opacity: 0.8;
    transform: translate(2px, -2px);
}


/* ─────────────────────────────
   NAVIGATION
───────────────────────────── */

.navbar {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid transparent;
}

.nav-name {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 22px; 
    font-weight: 600;
    transition: opacity 0.18s ease;
}

.nav-name:hover {
    opacity: 0.7;
}

.logo-mark {
    flex-shrink: 0;

    width: 18px;
    height: 18px;

    color: var(--foreground);

    transition:
        transform 0.25s ease,
        opacity 0.2s ease;
}

.nav-name:hover .logo-mark {
    transform: rotate(45deg);
    opacity: 0.75;
}

.navbar nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 16px; 
    color: var(--muted);
}

.navbar nav a {
    position: relative;

    transition: color 0.18s ease;
}

.navbar nav a::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -5px;

    width: 0;
    height: 1px;

    background: currentColor;

    transition: width 0.2s ease;
}

.navbar nav a:hover {
    color: var(--foreground);
}

.navbar nav a:hover::after {
    width: 100%;
}


/* ─────────────────────────────
   HERO
───────────────────────────── */

.hero {
    padding: clamp(30px, 4vw, 40px) 0 clamp(65px, 9vw, 110px);
}

.hero-greeting {
    margin-bottom: 8px;

    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 500;

    color: var(--muted);
}

.hero h1 {
    max-width: 1100px;

    font-size: clamp(3.25rem, 9vw, 8rem);
    font-weight: 700;

    line-height: 0.92;
    letter-spacing: -0.055em;

    overflow-wrap: break-word;
}

.hero-bottom {
    max-width: 650px;
    margin-top: clamp(30px, 4vw, 48px);
}

.tagline {
    margin-bottom: 18px;

    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 500;

    line-height: 1.2;
    letter-spacing: -0.02em;
}

.intro {
    max-width: 590px;

    font-size: 15px;
    line-height: 1.75;

    color: var(--muted);
}

.links {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}


/* ─────────────────────────────
   BUTTON SWAP ANIMATION
───────────────────────────── */

.swap-btn {
    position: relative;
    overflow: hidden;
    width: 140px; 
    height: 44px; 
    padding: 0 !important; 
}

.swap-btn .text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    opacity: 1; 
    transform: translateY(0);
    
    transition: 
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
        opacity 0.25s ease;
}

.swap-btn .icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 18px;
    opacity: 0; 
    transform: translateY(15px);
    
    transition: 
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
        opacity 0.25s ease;
}

.swap-btn:hover .text {
    opacity: 0;
    transform: translateY(-15px);
}

.swap-btn:hover .icon {
    opacity: 1;
    transform: translateY(0);
}


/* ─────────────────────────────
   WORK
───────────────────────────── */

.work {
    padding: clamp(60px, 8vw, 100px) 0;
}

.projects {
    border-top: 1px solid var(--border);
}

.project {
    display: block;

    padding: 21px 12px;
    margin-inline: -12px;

    border-bottom: 1px solid var(--border);

    transition:
        background 0.18s ease,
        color 0.18s ease,
        padding-left 0.18s ease,
        border-color 0.18s ease;
}

.project:hover {
    background: var(--hover-bg);

    padding-left: 18px;

    border-color: var(--border-hover);
}

.project h2 {
    font-size: 21px;
    font-weight: 600;

    letter-spacing: -0.015em;
}

.project p {
    margin-top: 6px;

    font-size: 14px;
    line-height: 1.5;

    color: var(--muted);

    transition: color 0.18s ease;
}

.project:hover p {
    color: rgba(199, 197, 197, 0.7);
}


/* ─────────────────────────────
   CURRENTLY
───────────────────────────── */

.currently {
    padding: 40px 0 90px;
}

.currently-text {
    max-width: 720px;

    font-size: clamp(1.5rem, 3vw, 2.7rem);
    font-weight: 500;

    line-height: 1.2;
    letter-spacing: -0.025em;
}


/* ─────────────────────────────
   CONTACT
───────────────────────────── */

.contact {
    padding: 70px 0 100px;

    border-top: 1px solid var(--border);
}

.contact-list {
    border-top: 1px solid var(--border);
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 15px 12px;
    margin-inline: -12px;

    border-bottom: 1px solid var(--border);

    font-size: 15px;
    font-weight: 500;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        padding-left 0.18s ease;
}

.contact-row:hover {
    background: var(--hover-bg);

    padding-left: 18px;
}

.contact-value {
    color: var(--muted);

    font-weight: 400;

    text-align: right;

    overflow-wrap: anywhere;
}

.contact-row:hover .contact-value {
    color: rgba(199, 197, 197, 0.7);
}


/* ─────────────────────────────
   PROJECT PAGE
───────────────────────────── */

.project-page {
    padding: 10px 0 100px; 
}

.back-nav {
    max-width: 900px;
    margin-inline: auto; /* Centers the navigation container to match the page body */
    display: flex;
    justify-content: flex-start;
}

.back-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    margin-bottom: 20px; 

    border: 1px solid transparent;
    border-radius: 8px; 

    font-size: 25px;
    line-height: 1;

    color: var(--muted);

    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.back-arrow:hover {
    color: var(--foreground);

    background: var(--hover-bg);
    border-color: var(--border-hover);

    transform: translateX(-3px);
}

.project-page h1 {
    max-width: 900px;

    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;

    line-height: 0.98;
    letter-spacing: -0.045em;
    
    margin-inline: auto;
    text-align: center;
}

.project-description {
    max-width: 650px;
    margin-bottom: 30px; 
    margin-top: 22px;
    
    font-size: 15px;
    line-height: 1.8;
    color: var(--muted);
    
    /* Centering the article block */
    margin-inline: auto;
    text-align: left;
}

.project-description h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--foreground);
    margin-top: 24px;
    margin-bottom: 10px;
}

.project-description p {
    margin-bottom: 16px;
}

.project-description li {
    margin-bottom: 6px;
}

.project-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px; 
    margin-bottom: 50px;
    
    justify-content: center;
}


/* ─────────────────────────────
   IMAGE GALLERY
───────────────────────────── */

.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 18px;
    
    max-width: 900px;
    margin-inline: auto;
}

.gallery-thumb {
    display: block;

    width: 100%;
    padding: 0;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: transparent;

    cursor: zoom-in;

    overflow: hidden;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.gallery-thumb:hover {
    border-color: var(--border-hover);
}

.gallery-thumb img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;

    transition: transform 0.35s ease;
}

.gallery-thumb:hover img {
    transform: scale(1.012);
}


/* ─────────────────────────────
   LIGHTBOX
───────────────────────────── */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px;

    background: rgba(0, 0, 0, 0.88);

    cursor: zoom-out;

    animation: lightbox-in 0.18s ease;
}

.lightbox-image {
    display: block;

    max-width: min(1400px, 94vw);
    max-height: 90vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border: 1px solid rgba(199, 197, 197, 0.18);
    border-radius: 6px;

    cursor: default;

    animation: image-in 0.22s ease;
}

.lightbox-close {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 1001;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    border: 1px solid rgba(199, 197, 197, 0.2);
    border-radius: 50%;

    background: rgba(27, 7, 40, 0.6);

    color: var(--foreground);

    font-size: 18px;

    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.lightbox-close:hover {
    background: rgba(199, 197, 197, 0.1);
    border-color: rgba(199, 197, 197, 0.4);

    transform: rotate(90deg);
}

@keyframes lightbox-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes image-in {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* ─────────────────────────────
   FOOTER
───────────────────────────── */

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 22px 0;

    border-top: 1px solid var(--border);

    font-size: 12px;
    color: var(--muted);
}

.footer-note {
    text-align: right;
}


/* ─────────────────────────────
   LARGE SCREENS
───────────────────────────── */

@media (min-width: 1440px) {
    .site {
        width: min(1380px, calc(100% - 160px));
    }

    .hero h1 {
        font-size: clamp(6rem, 8vw, 9rem);
    }
}


/* ─────────────────────────────
   TABLET
───────────────────────────── */

@media (max-width: 1024px) {
    .site {
        width: calc(100% - 72px);
    }

    .hero h1 {
        font-size: clamp(3.5rem, 10vw, 6.5rem);
    }

    .project-page h1 {
        font-size: clamp(2.5rem, 7vw, 4.5rem);
    }

    .lightbox {
        padding: 30px;
    }

    .lightbox-image {
        max-width: 92vw;
        max-height: 86vh;
    }
}


/* ─────────────────────────────
   MOBILE
───────────────────────────── */

@media (max-width: 700px) {
    .site {
        width: calc(100% - 40px);
    }

    .navbar {
        min-height: 60px;
    }

    .navbar nav {
        gap: 17px;
        font-size: 15px; 
    }

    .hero {
        padding: 15px 0 58px; 
    }

    .hero h1 {
        font-size: clamp(3rem, 17vw, 5rem);
        letter-spacing: -0.06em;
    }

    .hero-bottom {
        margin-top: 28px;
    }

    .tagline {
        font-size: 1.25rem;
    }

    .intro {
        font-size: 14px;
        line-height: 1.7;
    }

    .links {
        gap: 8px;
    }

    .btn {
        min-height: 42px;

        padding: 10px 15px;

        font-size: 13px;
    }

    .work {
        padding: 55px 0;
    }

    .project {
        padding: 17px 10px;
        margin-inline: -10px;
    }

    .project:hover {
        padding-left: 14px;
    }

    .project h2 {
        font-size: 18px;
    }

    .project p {
        font-size: 13px;
    }

    .currently {
        padding: 30px 0 60px;
    }

    .currently-text {
        font-size: clamp(1.45rem, 7vw, 2rem);
    }

    .contact {
        padding: 50px 0 65px;
    }

    .contact-row {
        padding: 13px 10px;
        margin-inline: -10px;

        font-size: 14px;
    }

    .contact-row:hover {
        padding-left: 14px;
    }

    .contact-value {
        max-width: 60%;
    }

    .project-page {
        padding: 10px 0 65px; 
    }

    .back-arrow {
        margin-bottom: 20px;
    }

    .project-page h1 {
        font-size: clamp(2.4rem, 12vw, 4rem);
    }

    .project-description {
        margin-bottom: 30px;
        font-size: 14px;
        line-height: 1.75;
    }

    .project-actions {
        margin-bottom: 35px;
    }

    .project-gallery {
        gap: 12px;
    }

    .lightbox {
        padding: 18px;
    }

    .lightbox-image {
        max-width: 96vw;
        max-height: 82vh;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;

        width: 40px;
        height: 40px;
    }

    footer {
        flex-direction: column;
        align-items: flex-start;

        gap: 8px;
    }

    .footer-note {
        text-align: left;
    }
}


/* ─────────────────────────────
   SMALL PHONES
───────────────────────────── */

@media (max-width: 420px) {
    .site {
        width: calc(100% - 28px);
    }

    .navbar nav {
        gap: 13px;
    }

    .nav-name {
        font-size: 14px;
    }

    .hero h1 {
        font-size: 2.9rem;
    }

    .links {
        width: 100%;
    }

    .links .btn {
        flex: 1;
    }

    .contact-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .contact-value {
        max-width: 100%;

        text-align: left;
    }

    .lightbox {
        padding: 12px;
    }
}


/* ─────────────────────────────
   REDUCED MOTION
───────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}