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

:root {
    color-scheme: dark;
    font-family: "Inter", Arial, sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #dce8fa;
    background: #031428;
}

body {
    min-width: 320px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background: #031428;
}

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

.site-header {
    border-bottom: 1px solid #26384e;
}

.header-content {
    width: min(1200px, calc(100% - 72px));
    min-height: 42px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-logo {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
}

.brand-mark {
    display: block;
    width: 30px;
    height: 28px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(28px, 8vw, 130px);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: clamp(14px, 2.2vw, 30px);
}

.nav-link a,
.nav-link .active,
.footer-links a {
    color: #bdc9d9;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.15s ease;
}

.nav-link a:hover,
.footer-links a:hover {
    color: #ffffff;
}

.nav-link .active {
    position: relative;
    color: #e5edfa;
}

.nav-link .active::after {
    position: absolute;
    right: 0;
    bottom: -9px;
    left: 0;
    height: 1px;
    background: #858aff;
    content: "";
}

.resume-button {
    min-width: 53px;
    padding: 6px 10px;
    border-radius: 3px;
    background: #6366ed;
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
    text-align: center;
    transition: background-color 0.15s ease;
}

.resume-button:hover {
    background: #777af7;
}

.nav-toggle {
    display: none;
    width: 38px;
    height: 34px;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid #26384e;
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 1px;
    background: #dce8fa;
}

.page-content {
    width: min(1200px, calc(100% - 72px));
    margin: 18px auto 0;
    flex: 1;
}

.intro {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(250px, 1fr);
    align-items: center;
    gap: clamp(28px, 4.5vw, 64px);
}

.intro-copy h1 {
    margin-bottom: 12px;
    color: #dce8fa;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.intro-copy p {
    max-width: 640px;
    color: #c1ccdc;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.55;
}

.profile-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 360px;
    border: 1px solid #26384e;
    border-radius: 7px;
    background: #101a29;
    filter: grayscale(1);
    object-fit: cover;
}

.dna {
    margin: clamp(56px, 9vw, 76px) 0 72px;
}

.dna h2 {
    margin-bottom: 18px;
    color: #dce8fa;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.dna-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.dna-card {
    min-height: 150px;
    padding: 14px;
    border: 1px solid #26384e;
    border-radius: 8px;
    background: #0d1a2a;
}

.card-icon {
    width: 29px;
    height: 29px;
    margin-bottom: 10px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #10233a;
    color: #c7caff;
}

.card-icon svg {
    width: 17px;
    height: 17px;
}

.dna-card h3 {
    margin-bottom: 5px;
    color: #dce8fa;
    font-size: 1.2rem;
    font-weight: 500;
}

.dna-card p {
    color: #c1ccdc;
    font-size: 1rem;
    line-height: 1.5;
}

.site-footer {
    min-height: 142px;
    display: flex;
    align-items: center;
    border-top: 1px solid #26384e;
    background: #021225;
}

.footer-content {
    width: min(1200px, calc(100% - 72px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-content p,
.footer-links a {
    color: #bdc9d9;
    font-size: 1rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-heading {
    margin-bottom: 10px;
    color: #dce8fa;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.page-description {
    max-width: 680px;
    color: #c1ccdc;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.65;
}

.page-intro {
    margin: 52px 0 56px;
}

.content-grid {
    display: grid;
    gap: 16px;
}

.content-card {
    border: 1px solid #26384e;
    border-radius: 8px;
    background: #0d1a2a;
    color: #dce8fa;
}

.content-card h2,
.content-card h3 {
    color: #dce8fa;
}

.content-card p {
    color: #c1ccdc;
    line-height: 1.6;
}

.skill-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.skill-card {
    min-height: 150px;
    padding: 22px;
}

.skill-card:first-child {
    grid-column: span 4;
}

.skill-card:nth-child(2) {
    grid-column: span 2;
}

.skill-card:nth-child(n + 3) {
    grid-column: span 3;
    min-height: 130px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 1.3rem;
    font-weight: 600;
}

.card-title svg,
.service-icon {
    width: 20px;
    height: 20px;
    color: #c7caff;
}

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

.skill-list span,
.tag-list span {
    padding: 8px 12px;
    border: 1px solid #26384e;
    border-radius: 5px;
    background: #111d2d;
    color: #dce8fa;
    font-size: 0.9rem;
}

.skill-card .stacked-skills {
    display: grid;
    gap: 8px;
}

.skill-card .stacked-skills span {
    display: block;
}

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

.service-card {
    min-height: 220px;
    padding: 24px;
}

.service-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 16px;
    padding: 7px;
    border: 1px solid #30435c;
    border-radius: 6px;
    background: #12243a;
}

.service-card h2 {
    margin-bottom: 8px;
    font-size: 1.3rem;
    font-weight: 600;
}

.service-card p {
    margin-bottom: 16px;
    font-size: 1rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list span {
    padding: 5px 9px;
    border: 0;
    background: #14253a;
    font-size: 0.8rem;
}

.project-grid,
.blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card,
.blog-card {
    overflow: hidden;
}

.project-card img,
.blog-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1.7 / 1;
    border-bottom: 1px solid #26384e;
    object-fit: cover;
}

.project-card-body,
.blog-card-body {
    padding: 18px;
}

.project-card h2,
.blog-card h2 {
    margin-bottom: 8px;
    font-size: 1.3rem;
    font-weight: 600;
}

.project-card p,
.blog-card p {
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.project-link,
.read-more {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid #26384e;
    border-radius: 5px;
    color: #dce8fa;
    font-size: 0.95rem;
}

.project-link:hover,
.read-more:hover {
    background: #14253a;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #aebbd0;
    font-size: 0.8rem;
}

.blog-meta span {
    padding: 4px 8px;
    border-radius: 4px;
    background: #14253a;
    color: #dce8fa;
    text-transform: uppercase;
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr);
    align-items: start;
    gap: 24px;
}

.contact-form,
.contact-panel {
    padding: 24px;
    border: 1px solid #26384e;
    border-radius: 8px;
    background: #0d1a2a;
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    color: #bdc9d9;
    font-size: 0.9rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #26384e;
    border-radius: 5px;
    outline: none;
    background: #07172a;
    color: #dce8fa;
    font: inherit;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: #777af7;
}

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

.contact-submit {
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 5px;
    background: #6366ed;
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.contact-aside {
    display: grid;
    gap: 16px;
}

.contact-panel h2 {
    margin-bottom: 18px;
    font-size: 1.25rem;
}

.contact-panel p,
.contact-panel a {
    color: #c1ccdc;
    font-size: 0.95rem;
    line-height: 1.6;
}

.contact-panel a {
    display: block;
    margin-top: 10px;
}

.contact-panel a:hover {
    color: #fff;
}

@media (min-width: 1400px) {
    .page-content,
    .header-content,
    .footer-content {
        width: min(1200px, calc(100% - 96px));
    }
}

@media (max-width: 760px) {
    .header-content,
    .page-content,
    .footer-content {
        width: calc(100% - 40px);
    }

    .header-content {
        min-height: 60px;
        flex-wrap: wrap;
        padding: 10px 0;
        gap: 10px 16px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        flex: 1 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 8px 0 6px;
    }

    .nav-menu.collapse:not(.show) {
        display: none;
    }

    .nav-menu.collapsing {
        display: flex;
        height: 0;
        overflow: hidden;
        transition: height 0.35s ease;
    }

    .nav-link {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 18px 24px;
    }

    .nav-link .active::after {
        bottom: -5px;
    }

    .resume-button {
        align-self: flex-start;
        padding: 8px 12px;
        font-size: 0.95rem;
    }

    .intro {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .intro-copy h1 {
        font-size: clamp(2.2rem, 8vw, 3rem);
    }

    .intro-copy p {
        font-size: 1rem;
    }

    .page-intro {
        margin: 38px 0 36px;
    }

    .skill-grid {
        grid-template-columns: 1fr;
    }

    .skill-card:first-child,
    .skill-card:nth-child(2),
    .skill-card:nth-child(n + 3) {
        grid-column: auto;
    }

    .project-grid,
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .profile-image {
        width: min(100%, 420px);
        max-height: none;
        justify-self: center;
    }

    .dna {
        margin-top: 52px;
    }

    .dna-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dna-card {
        min-height: 160px;
    }

    .dna-card h3 {
        font-size: 1.1rem;
    }

    .dna-card p {
        font-size: 0.95rem;
    }
}

@media (max-width: 460px) {
    .header-content,
    .page-content,
    .footer-content {
        width: calc(100% - 32px);
    }

    .dna {
        margin-bottom: 48px;
    }

    .page-heading {
        font-size: clamp(2.2rem, 10vw, 2.8rem);
    }

    .service-grid,
    .project-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .skill-card,
    .service-card,
    .contact-form,
    .contact-panel {
        padding: 18px;
    }

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

    .form-field.full-width {
        grid-column: auto;
    }

    .dna-cards {
        grid-template-columns: 1fr;
    }

    .dna-card {
        min-height: 0;
    }

    .footer-content {
        align-items: flex-start;
        flex-direction: column;
        padding: 28px 0;
    }
}

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