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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #111;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Container ---- */
.container {
    max-width: 820px;
    width: 92%;
    margin: 60px auto;
    min-height: 100vh;
    background: #fff;
    padding: 72px 80px;
    position: relative;
    z-index: 10;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 16px 48px rgba(0,0,0,0.1);
    animation: containerIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ---- Typography ---- */
h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    line-height: 1.2;
}

h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 56px 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaeaea;
    letter-spacing: -0.01em;
}

p {
    color: #555;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* ---- Header ---- */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 64px;
}

.header-text-content { flex: 1; }

.subtitle {
    font-weight: 500;
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

#header-text {
    font-size: 0.95rem;
    font-weight: 400;
    color: #666;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ---- Profile Image ---- */
#image {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #1a1a1a;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#image:hover {
    border-color: #444;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

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

.profile-hover { opacity: 0; }
#image:hover .profile-hover { opacity: 1; }
#image:hover .profile-base { opacity: 0; }

/* ---- Skills ---- */
#skills { margin: 0 0 16px 0; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.skill-category {
    background: #fafafa;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.skill-category h3 {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;
    padding-bottom: 10px;
    border-bottom: 2px solid #111;
}

.skill-category ul { list-style: none; padding: 0; margin: 0; }

.skill-category li {
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
}

.skill-category li::before {
    content: "→";
    color: #999;
    margin-right: 8px;
    font-size: 0.8rem;
}

/* ---- Project Grid ---- */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    color: inherit;
    display: block;
    will-change: transform;
}

.card:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.card-image {
    overflow: hidden;
    height: 180px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 0;
    margin: 0;
}

.card:hover .card-image img { transform: scale(1.04); }

.card-body { padding: 20px 24px 24px; }

.card-body h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-body p {
    font-size: 0.88rem;
    margin-bottom: 0;
    color: #666;
    line-height: 1.6;
}

/* ---- Experience / Education ---- */
.experience-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0 16px 24px;
    border-left: 2px solid #eaeaea;
    margin-left: 4px;
    position: relative;
    gap: 20px;
    transition: border-color 0.3s ease;
}

.experience-item:hover { border-left-color: #111; }

.experience-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 22px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    transition: background 0.3s ease;
}

.experience-item:hover::before { background: #111; }

.role { font-weight: 600; font-size: 1rem; }
.company { color: #666; font-size: 0.9rem; }
.date {
    color: #999;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: none;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    background: #111;
    color: #fff;
    padding: 11px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: #333;
    transform: translateY(-1px);
}

/* ---- Footer ---- */
footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #eaeaea;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.footer-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-link:hover { color: #111; }

.footer-bottom {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    color: #bbb;
    font-size: 0.8rem;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .container {
        padding: 48px 28px;
        margin: 32px auto;
        border-radius: 12px;
        width: 95%;
    }

    header {
        flex-direction: column-reverse;
        text-align: center;
        gap: 32px;
    }

    .grid { grid-template-columns: 1fr; }
    #image { width: 160px; height: 160px; }

    .experience-item { flex-direction: column; gap: 4px; }
    .date { text-align: left; }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .container { padding: 36px 20px; margin: 20px auto; }
    .skills-grid { grid-template-columns: 1fr; }
}
