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

:root {
    --bg: #0f172a;
    --card: #172033;
    --border: #273449;
    --text: #ffffff;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #38bdf8;
    --primary: #2563eb;
    --input: #0f172a;
}

body.light-theme {
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #dbe3ee;
    --text: #0f172a;
    --muted: #475569;
    --soft: #334155;
    --input: #f1f5f9;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

body.no-scroll {
    overflow: hidden;
}

a {
    color: inherit;
}

header {
    width: 100%;
    border-bottom: 1px solid var(--border);
}

nav {
    width: 90%;
    max-width: 1100px;
    min-height: 75px;
    margin: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    margin-right: auto;
}

.logo span,
h1 span,
.section-heading h2 span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav ul li a {
    color: var(--soft);
    text-decoration: none;
    transition: 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--accent);
}

.theme-toggle,
.menu-toggle {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    border-radius: 8px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 18px;
}

.menu-toggle {
    display: none;
}

/* HOME */
.home {
    width: 90%;
    max-width: 1100px;
    min-height: calc(100vh - 130px);
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.home-text {
    max-width: 650px;
}

.small-text {
    color: var(--accent);
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

.welcome {
    color: var(--muted);
    margin-bottom: 12px;
}

.home h1 {
    font-size: 60px;
    margin-bottom: 10px;
}

.home h2 {
    color: var(--soft);
    margin-bottom: 20px;
    min-height: 29px;
}

.home-text > p:not(.small-text):not(.welcome) {
    color: var(--muted);
    line-height: 1.8;
}

.typing::after {
    content: "|";
    color: var(--accent);
    animation: blink 0.8s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* BUTTON */
.button {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.button a {
    text-decoration: none;
    color: white;
    background: var(--primary);
    padding: 13px 25px;
    border-radius: 8px;
    transition: 0.3s;
}

.button a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.button .outline {
    background: transparent;
    border: 1px solid var(--accent);
}

/* PROFILE */
.profile {
    width: 320px;
    padding: 40px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    flex-shrink: 0;
}

.profile-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent);
    display: block;
    margin: 0 auto 20px;
}

.profile p,
.about-profile p {
    color: var(--muted);
    margin-top: 8px;
}

/* GENERAL PAGE */
.page {
    width: 90%;
    max-width: 1000px;
    margin: 70px auto;
    min-height: calc(100vh - 220px);
}

.page-title {
    margin-bottom: 50px;
}

.page-title h1 {
    font-size: 50px;
    margin-bottom: 15px;
}

.page-title > p:last-child,
.section-heading > p:last-child {
    color: var(--muted);
}

/* ABOUT */
.about {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: start;
}

.about-profile {
    padding: 35px;
    text-align: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
}

.about-profile .profile-photo {
    width: 160px;
    height: 160px;
}

.about-text h2,
.section-heading h2 {
    font-size: 30px;
    margin-bottom: 20px;
}

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

.about-text h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills span {
    background: #172554;
    color: #7dd3fc;
    border: 1px solid #1e40af;
    padding: 8px 14px;
    border-radius: 7px;
    font-size: 14px;
}

.hobbies-section,
.photo-section {
    margin-top: 80px;
}

.section-heading {
    margin-bottom: 90px;
}

.hobi-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.hobi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.hobi-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.hobi-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

.hobi-card h3 {
    margin-top: 15px;
}

.hobi-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-top: 8px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.photo-grid img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform 0.3s;
}

.photo-grid img:hover {
    transform: scale(1.03);
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(2, 6, 23, 0.88);
}

.lightbox.show {
    display: flex;
}

.lightbox-content {
    max-width: 900px;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 12px;
}

.lightbox-content p {
    margin-top: 12px;
    color: white;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    border: none;
    background: transparent;
    color: white;
    font-size: 42px;
    cursor: pointer;
}

/* CONTACT */
.contact {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-box {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 12px;
}

.contact-box h3 {
    margin-bottom: 8px;
}

.contact-box p {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.contact-box a {
    color: var(--muted);
    text-decoration: none;
}

.contact-box a:hover {
    color: var(--accent);
}

.contact-right {
    display: grid;
    gap: 25px;
}

/* FORM */
form {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form h2 {
    margin-bottom: 10px;
}

label {
    color: var(--soft);
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px;
}

input,
textarea {
    width: 100%;
    padding: 14px;
    background: var(--input);
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
    font-family: Arial, sans-serif;
    outline: none;
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
}

form button {
    border: none;
    padding: 14px;
    margin-top: 5px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
}

form button:hover {
    background: var(--accent);
}

.form-message {
    min-height: 22px;
    font-size: 14px;
    line-height: 1.5;
}

.form-message.error {
    color: #f87171;
}

.form-message.success {
    color: #4ade80;
}

.contact-profile {
    width: 100%;
}

.contact-profile .profile-photo {
    width: 140px;
    height: 140px;
}

/* REVEAL ANIMATION */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* BACK TO TOP */
.back-top {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: 0.3s;
    z-index: 500;
}

.back-top.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 25px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

/* RESPONSIVE */
@media (max-width: 750px) {
    nav {
        min-height: 75px;
        flex-wrap: wrap;
        padding: 15px 0;
    }

    .menu-toggle {
        display: block;
    }

    nav ul {
        order: 5;
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 15px;
        padding: 10px 0 5px;
    }

    nav ul.show {
        display: flex;
    }

    .home {
        flex-direction: column;
        text-align: center;
        padding: 60px 0;
    }

    .home h1 {
        font-size: 45px;
    }

    .button {
        justify-content: center;
        flex-wrap: wrap;
    }

    .profile {
        width: 100%;
        max-width: 320px;
    }

    .about,
    .contact {
        grid-template-columns: 1fr;
    }

    .hobi-container {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-title h1 {
        font-size: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
